An Office service that supports add-ins to interact with objects in Office client applications.
Document properties not syncing after creating word document
Anonymous
I have created a software in Word that can store .docx files and then load them back into Word. The code to load them back in is as follows:
let text = Buffer.from(data.file, "hex").toString("base64");
context.application.createDocument(text).open();
return context.sync();
The file opens correctly with the same formatting, text and structure. However, any 'Document Properties' or 'Document Info' boxes that would usually sync across the document no longer do.
I have seen that only rich text content controls work currently, and so this may be the cause of the problem.
If anyone has any feedback, that would be greatly appreciated.
Microsoft 365 and Office | Development | Office JavaScript API
Microsoft 365 and Office | Development | Office JavaScript API
Sign in to answer