Update Fields with officejs after changing DocumentProperty

%3CLINGO-SUB%20id%3D%22lingo-sub-3051569%22%20slang%3D%22en-US%22%3EUpdate%20fields%20with%20officejs%20after%20changing%20DocumentProperty%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3051569%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%3CBR%20%2F%3E%3CBR%20%2F%3EI'm%20looking%20for%20some%20help%20and%20I%20can't%20find%20the%20answer%20online.%3CBR%20%2F%3E%3CBR%20%2F%3EI'm%20building%20a%20Word%20Add-in%20with%20officejs%201.3.%26nbsp%3B%3CBR%20%2F%3EOn%20this%20Add-in%20the%20user%20fills-out%20a%20form.%20With%20the%20given%20data%20I%20override%20or%20add%20these%20to%20CustomDocumentProperties.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20'Fields'%20on%20the%20document%20is%20not%20updatet%20and%20keep%20showing%20the%20old%20data.%20Even%20after%20closing%20and%20opening%20the%20document.%20Only%20when%20I%20right-click%20on%20the%20'Field'%20and%20choose%20for%20'Update%20Field'%20the%20updatet%20value%20is%20shown.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20can't%20use%20Macro's%20because%20it%20has%20to%20work%20on%20a%20Mac%20as%20well.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EIn%20VSTO%2C%20we%20can%20easily%20update%20fields%20of%20a%20Word%20document%20using%20c%23%20code%3A%3C%2FP%3E%3CP%3E_wordApplication.ActiveDocument.Fields.Update()%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20how%20do%20I%20manage%20this%20with%20officejs%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20helping%20me%20out!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EJeffrey%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3051569%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Eofficejs%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWord%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

Hi all,

I'm looking for some help and I can't find the answer online.

I'm building a Word Add-in with officejs 1.3. 
On this Add-in the user fills-out a form. With the given data I override or add these to CustomDocumentProperties.

 

The 'Fields' on the document is not updatet and keep showing the old data. Even after closing and opening the document. Only when I right-click on the 'Field' and choose for 'Update Field' the updatet value is shown.

 

I can't use Macro's because it has to work on a Mac as well.


In VSTO, we can easily update fields of a Word document using c# code:

_wordApplication.ActiveDocument.Fields.Update();

 

But how do I manage this with officejs?

 

Thanks for helping me out!

 

Jeffrey

2 Replies
Hi team,

Today it is been a month I've posted this issue. I see it has been assigned to various people, unfortunately no response or a solution yet. Is there any update.

Thanks in advance ;)

Jeffrey
I don't know anything about Office js, but can you use document variables and DOCVARIABLE fields?