Open NataliaKravcheniaTR opened 1 month ago
Here are some similar issues that might help you. Please check if they can solve your problem.
Possible solution (Extracted from existing issue, might be incorrect; please verify carefully)
FYI it looks like this was related to my version of Word. After updating to 2304 I no longer get the error.
Reference:
If style count passes the limit, Word simply does not gracefully handle the scenario - you end up in a world of undefined behavior. The user should avoid this. We will let you know if Word side improves the experience.
Reference:
Powered by issue-sentinel
These issues are not related to mine.
Hi @NataliaKravcheniaTR Are you working on Word online or Word desktop?
@penglongzhaochina Word Desktop
Hi @NataliaKravcheniaTR ,
The viewing mode means that we can only read the file but not edit the file. Any inserted operation not been allowed no matter from human manually or add-in inserted. All the inserting operation from addin will throw exception not only "insertfilefrombase64". Thank you.
Yes, I understand that, but can it be more specific exception instead of GeneralException?
Or could we check that document is in 'Viewing' mode?
I've tried Office.context.document.mode
but it returns readWrite
' when a document is in Viewing or Editing mode
Thanks for reporting this issue.
It has been put on our backlog<Bug#9898914> for internal track. We will keep track of this issue and let you know if there are any updates.
When document is in 'Viewing' mode, insertFileFromBase64 throws GeneralException exception
Your Environment
Platform [PC desktop, Mac, iOS, Office on the web]: PC desktop, Mac, Office on the web Host [Excel, Word, PowerPoint, etc.]: Word Browser (if using Office on the web): Chrome
Expected behavior
When document is in 'Viewing' mode, insertFileFromBase64 throws ReadOnlyException (that we can identify that document is read-only) instead of GeneralException exception
Current behavior
When document is in 'Viewing' mode, insertFileFromBase64 throws GeneralException exception
Steps to reproduce
Office.context.document.mode always returns 'readWrite' Document.getActiveViewAsync is not working in Word.