frank-hoffman
Feb 23, 2024Tin Contributor
Status:
New
Implement Document.Protect and Document.Unprotect in Word JavaScript API
I'm developing an add-in using the Word JavaScript API, and I need the ability to work with protected Word documents programmatically. In VBA and VSTO, I was able to unprotect these documents, alter ...
DavideBono
Feb 10, 2025Brass Contributor
HI
it is possible to save and read custom properties via Office.js :
https://learn.microsoft.com/en-us/javascript/api/word/word.customproperty?view=word-js-preview
It is not possible to intercept the save event or disable the button, I created the idea to handle the save event:
It is not even possible to implement document protection
Follow this post or my idea :
mkanorwala
Feb 10, 2025Copper Contributor
Hi DavideBono thanks for your reply. Yes i Achieved the saving and reading custom properties via office.JS. but i want to see if we can achieve it by writing any .net command or handler to handle this but via office.js in some way? Is there a work around?. Or the other part is I am using web-dav to open files on word from server using web-dav url. So based on if the document is a web-dav url or not can we do it?