Skip to content

Commit 66c6c3a

Browse files
[Word] (troubleshooting) Include additional cases (#5069)
1 parent 46af757 commit 66c6c3a

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs/word/word-add-ins-troubleshooting.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,28 @@ If noncontiguous selections are made, the Word API only operates on the last con
1616

1717
To learn more generally about making noncontiguous selections, see [How to select items that are not next to each other](https://support.microsoft.com/topic/8b9c1be9-cca3-935a-7cbf-94403aa48d2e).
1818

19+
## Annotations don't work
20+
21+
If the annotation APIs aren't working, it may be because you're not using a Microsoft 365 subscription. If you're using a one-time purchase license, this could be why these APIs aren't working for you.
22+
23+
The annotation APIs rely on a service that requires a Microsoft 365 subscription. Therefore, verify that you're running the add-in in Word connected to a Microsoft 365 subscription license before debugging further.
24+
25+
For more about this problem, see [GitHub issue 4953](https://github.com/OfficeDev/office-js/issues/4953).
26+
1927
## Body.insertFileFromBase64 doesn't insert header or footer
2028

2129
It's by design that the [Body.insertFileFromBase64](/javascript/api/word/word.body#word-word-body-insertfilefrombase64-member(1)) method excludes any header or footer that was in the source file.
2230

2331
To include any headers or footers from the source file, use [Document.insertFileFromBase64](/javascript/api/word/word.document#word-word-document-insertfilefrombase64-member(1)) instead.
2432

33+
## Can't use Mixed to set a property
34+
35+
Several enums in Word offer "Mixed" as a valid value. However, the value can primarily be returned when a get a property or make a get* API call. This is because "Mixed" means that several options are applied to the current selection. If you try to set the option to "Mixed", then it isn't clear which actual value should be applied to the selection.
36+
37+
For example, let's say you're working with the borders around a section of text. Each [border](/javascript/api/word/word.border#word-word-border-width-member) can be set to a different [width](/javascript/api/word/word.borderwidth). If the top border is "Pt025" (that is, 0.25 points), the bottom border is "None", and the left and right borders are "Pt050" (that is, 0.50 points), then when you get the width of the borders, "Mixed" is returned. If you want to change the width of the borders, call the set API on each border using an enum value other than `mixed`.
38+
39+
This behavior also applies for enum values like "Unknown".
40+
2541
## Get a GeneralException when working with styles
2642

2743
If users are hitting a GeneralException when your add-in calls [Document.insertFileFromBase64](/javascript/api/word/word.document#word-word-document-insertfilefrombase64-member(1)) or Style APIs, it may be that those users are exceeding limits imposed by the Word application. To learn more about these limits, see [Operating parameter limitations and specifications in Word](/office/troubleshoot/word/operating-parameter-limitation).
@@ -86,6 +102,12 @@ The following shows an example of the new window hierarchy. Note that the interm
86102

87103
You can use a debugging tool like [Spy++](/visualstudio/debugger/using-spy-increment) to inspect an application's window hierarchy. However, keep in mind that the hierarchy could further change in the future.
88104

105+
## Native JavaScript APIs don't work with Word.Table
106+
107+
The [Word.Table](/javascript/api/word/word.table) object is different from an [HTML table object](https://developer.mozilla.org/docs/Learn_web_development/Core/Structuring_content/HTML_table_basics). The native JavaScript APIs used to interact with an HTML table can't be used to manage a Word.Table object. Instead, you must use the [Table APIs](/javascript/api/word/word.table) available in the Word Object Model to interact with Word.Table and related objects.
108+
109+
Similarly, don't use Word JavaScript APIs to interact with HTML table objects.
110+
89111
## See also
90112

91113
- [Troubleshoot development errors with Office Add-ins](../testing/troubleshoot-development-errors.md)

0 commit comments

Comments
 (0)