- #Custom document properties word 2013 how to#
- #Custom document properties word 2013 serial number#
- #Custom document properties word 2013 code#
Just thought I would share what I have done to protect the use of the template. We can also let them know that they are not allowed to give a copy to anyone else. By working with the registered user we can reactivate their copy to be the registered copy and at that point the copy they gave away will no longer work. But this process will at least cause only one copy to be a working copy. The copy they gave away will continue to work. All Office applications (Excel, Word, PowerPoint, etc.
#Custom document properties word 2013 how to#
If a registered user shares their copy of the template and the individual they gave it to uses it before the registered user uses it again, the registered user's copy will not longer work when they try to use it because the rendom numbers do not work. This page describes how to use the Built-In and Custom document properties of a workbook.
#Custom document properties word 2013 code#
If the template is found to be registered, not shared and actually creates the new document the code immediately creates a new random number for that copy of the template, updates the custom document property in the template file and updates the field in the SQL database in the cloud with the same random number so the entire process can be performed again the next time the template is used. Because the unigue random number is created and updated in the template and the database each time the template is used the sharing of the template is prevented because the two random numbers will not match. Again, if the random numbers are found and match, all is just fine, but if the random numberes do not match, the user is informed and the template will not create the new document.
#Custom document properties word 2013 serial number#
If the serial number is found to be valid, the code then checks to see if the unique random number stored in the custom document property is equal to the random number saved to the cloud database record. The template closes without creating a new document. If the matching serial number cannot be found the user is informed that the current copy of the template cannot be verified as a valid registered copy of the template and will be closed. These two unique values are written to custom document properties in the template and also written to a table in a hosted SQL database in the cloud.Įach time the user opens or uses the template, code in the templated immediately checks to see if the serial number stored in the custom document property can be found. The process works like this a unique (incrementing) serial number is assigned to each copy of the template and a random number is then generated that is also assigned to the template. This client wanted to be able to allow multiple users to use this template but not to allow any user to be able to share or give the template away to anyone else. Just FYI, my goal was to be able to protect the use of a very custom template that I have been developing for a client. I was able to use some of your code to accomplish exactly what I wanted to do.
![custom document properties word 2013 custom document properties word 2013](https://www.add-in-express.com/creating-addins-blog/wp-upload/images/2013/word-properties/wordart.png)
I just wanted to get back with you and let you know how much I really appreciate you assistance.