JL8707
JL8707

Reputation: 41

Excel 2016 and Office 365 custom document property

I have an Excel XLL which uses Excel Interop and I use customDocumentProperties to store some settings for the workbook. The C# code looks like:

var customDocumentProperties = Workbook.CustomDocumentProperties;
customDocumentProperties.Add("MyData", false, Microsoft.Office.Core.MsoDocProperties.msoPropertyTypeString, "mysettings");

Now I am trying to create an Office add-in (excel task-pane) with Office.js and the equivalent way to store custom data is using Office.context.document.settings. So javascript code looks something like:

Office.context.document.settings.set("MyData", "mysettings");

However, these two methods are incompatible. ie. if I set the property with the the XLL, I can not read it with the Office add-in and vice versa.

Is there anyway to create compatible custom document properties that can be used in both Excel 2016 (through xll c# or vba) and Office 365 Excel?

Thanks in advance, Jon

Upvotes: 0

Views: 658

Answers (1)

Michael Zlatkovsky
Michael Zlatkovsky

Reputation: 8670

No, it is not currently possible. You may be able to inspect the OOXML format of the Word document to figure out where the Office add-in settings live, but there's no official path.

We do have adding custom document properties / custom XML parts on our backlog...

~ Michael Zlatkovsky, developer on Office Extensibility team, MSFT

Upvotes: 2

Related Questions