600 questions
1
vote
1
answer
75
views
How to only allow desktop versions of Word for custom Word add-in?
I'm developing a Word add-in that uses some features that are not available in Word for Web (e.g. I'm accessing context.document.shapes which is only available on Word for desktop: https://learn....
0
votes
0
answers
37
views
New VSTO Word Add-In unable to start word
I created a new C# VSTO Word-Add in (Framework 4.8.1) in Visual Studio 2022.
Made no modifications at all and then tried to start it (F5), but it ends with this error message:
-------------------------...
0
votes
0
answers
72
views
How to get text from all selected cells in a table?
I'm working on a Word add-in using the Office JS API and am building a converter that changes the selected text into a different format.
I’m not encountering any issues when the selection is a ...
0
votes
0
answers
75
views
Word Interop Find.Execute() modifies the source Range object to a undesired value
I'm using Word Interop Libraries to identify bold text in a Word document and add comments to those sections. However, while running the code, I noticed an issue(from the Word UI): when a bold part or ...
0
votes
0
answers
65
views
Issue with UndoRecord.StartCustomRecord in VSTO add-in: Undo stack breaks after bullet/numbering
I am using UndoRecord.StartCustomRecord in Microsoft.Office.Interop.Word to create custom undo records in my VSTO add-in. However, I’ve encountered some unexpected behavior that makes the Word undo ...
0
votes
1
answer
91
views
programmatically Enable "Always Use These Values Regardless of Sign-in to Office" in MS Word API
TL;DR:
I want to programmatically enable the "Always use these values regardless of sign-in to Office" setting found in File > Options > General in Microsoft Word. Does any Word API ...
0
votes
1
answer
73
views
how to identify "Comments" button VSTO identifier in windows word document
I have VSTO Addin in word document, and I want to identify the "Comments" button that is displayed on top right corner of the word document. provided a screenshot for reference.
The comments ...
1
vote
0
answers
28
views
Attempting to draw in a word document with a Microsoft Word addin using vscode
I'm a total newbie taking my first steps in developing a Word Addin using vscode and javascript. I've used this example that I'm trying to expand on:
https://github.com/OfficeDev/Office-Add-in-samples/...
0
votes
1
answer
112
views
Office Word Addin doesn't load task pane
I am really struggling to understand why my task pane is not showing up in Microsoft word. The button to trigger the taskPane appears under "AddIns" as expected but clicking it does not open ...
0
votes
0
answers
27
views
Custom word Add-in is listed but not able to use
I've created a Microsoft Word Add-in that works as expected on one Windows server with Microsoft Office 2021 Professional installed. However, on another server where Microsoft Office 2021 Standard is ...
0
votes
1
answer
75
views
Office Word Add-In ExecuteFunction displaying commands.html instead of running the function
I'm new to Office Add-ins so this might be a trivial mistake. For this Typescript React Add-in I have created a Context Menu Extension Point that on click is supposed to run a custom function ...
0
votes
0
answers
85
views
Custom XML Parts in Word Online gets removed
I have a Word document that contains Custom XML Parts, and it works perfectly when opened in the Desktop version of Word. Using Office.js, I can successfully retrieve the XML parts with the following ...
0
votes
2
answers
245
views
Get the following Monday's date using MS Word field codes
I have a Microsoft Word 2021 document that I'd like to use a field code to insert the following Monday's date, whatever today's date is.
For example, if I open the doument on Thursday 12th December ...
1
vote
0
answers
46
views
Word Add-in - How to Include Custom Properties in OOXML with Office.js API
I'm using the Office.js client API to add a custom property key to a Word document through context.document.properties.customProperties. However, when I export the document to OOXML format using ...
1
vote
0
answers
92
views
XML Schema Validation Error in Add-in Manifest for Word Task Pane with Title Field
I'm developing a Word web add-in with a task pane and dialog using office-js. The task pane functionality works perfectly when I sideload the add-in locally.
Here’s the relevant part of my manifest ...
0
votes
1
answer
168
views
Word addin - Office js Api - ReadOnly document
HI Is it possible via the Office JS API to manipulate the Word document or individual paragraphs so as to make them read-only? To be clear, I would like to do this: https://support.microsoft.com/en-us/...
1
vote
1
answer
103
views
Word Api office.js - Position of bookmark
I'm using Word's client api, Office.js
After reading a certain bookmark via its name with the function
var bookmark = context.document.getBookmarkRangeOrNullObject("BOOKMARK");
Is it ...
0
votes
2
answers
104
views
Handling Word After Save Event for Documents Saved to SharePoint or OneDrive in VSTO AddIn
I implemented the Word After Save Event by DAVID E. CRAIG in my VSTO Word AddIn in C#.
I need the AfterSaveUiEvent to update a dictionary that contains some information about the document. The key to ...
1
vote
0
answers
58
views
Is it possible to get the language of the text in a Word Add In using Word JS API?
Is there a way of getting the language of text in a document using the Word JS API for an Office Add In? It seems that the Word.Font class does not have this as an option: link
Is there a work around ...
0
votes
1
answer
81
views
Context Menu Add-in Command(Word) [ExtensionPoint xsi:type="ContextMenu"]
I am using this example from the Microsoft Docs to add a button in the context menu, I am running the validator and the manifest file is valid. This ExtensionPoint is right below the ...
0
votes
1
answer
45
views
How to Update Ribbon Layout in Word Web Add-in Using Office.js and Manifest
I am developing a Word web add-in using Office.js, and I need to update the layout of the ribbon. I have created a basic ribbon following this documentation
Here is a snapshot of my current ribbon:
...
0
votes
0
answers
51
views
Word Add-In in React. Track Changes not working as expected
I am trying to let an algorithm automatically Track Changes in a Word Document. In this Case I want it to correct a string to in Track Changes Mode. However, the Track Changes Mode is not working as ...
1
vote
0
answers
27
views
word formatting issue : underlines continues while typing, next to previously underlined word
I have underlined the word through my JS add-in code by updating the Ooxml value, and to identify that word I have used the bookmark, (added the underline inside the bookmark).
The issue I'm facing is ...
1
vote
0
answers
110
views
Error when updating empty content type properties via CustomXmlParts
Im currently developing a VSTO Word AddIn in C#.
Properties that come from SharePoint (ContentTypeProperties) are stored in a customXmlPart with this namespace Uri: "http://schemas.microsoft.com/...
0
votes
1
answer
94
views
Is this possible to add/update ribbon dynamically while runtime in word add-in created with officejs?
I am developing a Word add-in using OfficeJS and Angular. There is a requirement to update the ribbon text dynamically at runtime. Is this possible now?
I want to display the name of the current ...
2
votes
1
answer
93
views
Is there a event that is fired after the word file is loaded?
I am currently developing a Vsto Word Addin in C#.
I am looking for an event that is fired every time a new document is created from a template and the document is fully loaded and displayed to the ...
0
votes
0
answers
93
views
Use query string parameters on Word add-in SourceLocation(manifest.xml)
I want to use query string parameters on SourceLocation on a Office add in(Word add in). I can add the query string parameters inside the manifest.xml file. How can I read them inside taskpane.html ...
1
vote
0
answers
86
views
Remove specific text block from word document
I am creating a Word add-in that writes in a document while generating some text.
The problem is that sometimes the document already has something above the generated text, so I need to keep that ...
1
vote
0
answers
36
views
Non-editable fields in word table after export from Power Bi paginated report
I need to create a power bi paginated report whose source is mysql. This paginated report should give an export option in word file but Some columns of exported word file should be non-editable. later ...
0
votes
1
answer
85
views
Word Office Javascript API - Format first x chars
I need to change the size of the first X characters for my add-in. To do this, I should either be able to go through the individual characters or format the first X characters in one go. But I can't ...
0
votes
1
answer
145
views
Office.JS Word API - Can't update property fields from ExecuteFunction in manifest
I have an Office web add-in for Word that needs to fetch custom properties from an API and store them under document.properties.customProperties the user will then be able to insert them into their ...
0
votes
1
answer
69
views
Word Office Javascript API Perfomance
I would like to develop a Word Addinn. With which I can work my way through the paragraphs of a Word document and customize the formatting of the document. I would like to color the vowels of words in ...
0
votes
1
answer
469
views
Accept/Reject Tracked Changes in word document using office js api
I am using office js to track the user changes in the document:
async function setChangeTrackingMode() {
// Sets the change tracking mode.
await Word.run(async (context) => {
context....
0
votes
1
answer
62
views
How to make office-js MS Word Add-ins to work with Connected experiences disabled?
We have at team, who needs to have Connected experiences in Office disabled.
How can I get a office-js MS Word Add-in with a backend to work with Connected experiences disabled?
0
votes
1
answer
549
views
How to use the Word JS API to search for text with tracked changes enabled
I have a Microsoft Word document with tracked changes enabled, which I am trying to search for a string of text. I want to search for what the text would be if tracked changes were accepted. I do this ...
2
votes
0
answers
88
views
How to send Document.getFileAsync file object to the server side using officejs
I'm working on a Word Office Add-in project. I need to get the current Office file and upload it to our server. I got the file Object using Document.getFileAsync method. When I upload to the server I ...
2
votes
0
answers
48
views
How to perform conditional Rendering using word api in officejs
I want to perform conditional rendering in Word. With the click of a hide button, I want to hide the selected text. and on the show, the hidden text should be visible again.
How can I perform the ...
0
votes
1
answer
62
views
Issues with Text Manipulation Visibility when Importing External DOCX in MS Word Add-in using JavaScript API
I am developing a Microsoft Word add-in using the JavaScript API, and I am encountering a problem when trying to import an external DOCX file into the current document. To achieve this, I converted ...
0
votes
1
answer
333
views
Create new document with base64 using office javascript API in office 365
Using this I am creating new document with base64String in word this is working in word desktop version but this is not working on Office 365.
async function CreateNewDoc(event) {
try {
...
2
votes
1
answer
112
views
how to insert value to row cells adding new row in table using office js in word?
using This I am adding new row in table how can I give value to its cells
await Word.run(async (context) => {
const selection = context.document.getSelection();
selection.load('...
-1
votes
1
answer
60
views
how can I get `parentSectionOrNullObject` Range in word? using Office javascript Api?
I am using this but this is giveing error TypeError: Cannot read properties of undefined (reading 'isNullObject') when I am using breakpoint then this is give selection.parentSectionOrNullObject ...
0
votes
1
answer
176
views
how can I get Word.Section Range using office javascript api?
I want to get current Word Section range. where my cursor is clicked get there section rage.
this is like of Microsoft documentation
Word.Section class
0
votes
1
answer
210
views
I want to get All hidden Bookmarks from word document using office JS
I want to Get All hidden bookmarks names from my document in word using word JS add-in
using this is I am trying but not done.
getBookmarks(includeHidden, includeAdjacent)
await Word.run(async (...
0
votes
1
answer
178
views
How to get the active document info/text in word, through office JS API
I want to get the current active document info/text, which user is able to see on screen.
Can we achive it throgh Word JS API? Or is there any other way to get the current/active page in word for JS ...
1
vote
1
answer
115
views
Paragraph marks and hidden formatting symbols (¶) using Office JavaScript API code in Word add-in
Is it possible to add and remove paragraph marks and hidden formatting symbols(¶) using office js.
0
votes
0
answers
58
views
how can I insert online video in word body using office js?
I am trying to insert video in word document body but not succeed. is that possible to insert online video in word document using javascript. if anybody knows about it please help. thanks in advance.
0
votes
1
answer
108
views
Office Word JS breaks on office on the web but not on desktop version of word
the following function works just fine on the following desktop-version of Word (Microsoft® Word for Microsoft 365 MSO (Version 2309 Build 16.0.16827.20130) 64-bit). However upon testing it with ...
0
votes
1
answer
78
views
how to insert html where is my cursor in word add-in using javascript office api?
using this I am Inserting 2 columns table with html. using "Word.InsertLocation.end" this is inserting html to end I want where my cursor clicked insert Html on that location.
async ...
1
vote
1
answer
78
views
Can you automatically trigger installation of Word Web Add-in?
I'm developing a Word Web Add-in with Office.js. This will work in conjunction with a existing VSTO add-in.
The VSTO installation process is as follows: A user clicks a link on a Web page. This opens ...
0
votes
2
answers
218
views
how to delete table design from word document page using javascript ? Word js Add-in
I am inserting a table design in word document last page from table html. how can I delete it
this is my code
async function NewMap() {
try {
await Word.run(async (context) => ...