I'm reading settings from a Word Document using:
function callbackFunction(){
var varValue = Office.context.document.settings.get("VariableName");
}
This call is made right after a call to :
Office.context.document.settings.refreshAsync(callbackFunction);
The settings are stored in a valid JSON String WebExtensionProperty: I can see the setting object in the Open XML productivity tool, without problem
We.WebExtensionProperty prop = new We.WebExtensionProperty(){ Name = "VariableName", Value = "{\"A\":\"1\"}" };
webExtensionPropertyBag1.Append(prop);
- When I run my office-js add-ins from Visual Studio into Word (Using IE), the function returns the correct object from the JSON string stored in the WebExtensionProperty,
When I sideload my add-ins into Word (Using IE), the function also returns correctly, but
When I sideload my add-ins into Word online (Also using IE, even with Chrome), the function always returns null!
When I download the document from OneDrive, my property is still in the file.
I tried with simple variable in the json string, but I never managed to get Word Online ever return any value here, whereas Word on the Desktop always worked flawlessly.
Is there anything I need to do to 'authorize' the use of this function? Anyone having luck with this method in Word Online?
The settings I write into the file use is:
new We.WebExtensionStoreReference(){ Id = "MyUniqueId", Version = "1.0.0.0", Store = "\\\\localhost\\OfficeManifest", StoreType = "Filesystem" };
When I use it on Word online, could it be that the sideloading makes this same Add-ins not being in my UNC path, and therefore Word online can't load the value?
The manifest I use when sideloading is the same in all cases.
Thanks