Hi,
How to set the editing restrictions for the Word document programmatically using SAS?
The aim is to enable the Read-Only mode but set the password to restrict the editing.
I'm using the below code to set the read-only attributes but would like to protect them with a password.
x attrib -r ".\xyz.RTF" ; *Removes Read Only Attribute ;
%report;
x attrib +r ".\xyz.RTF" ; *Adds Read Only Attribute;
Any inputs are much appreciated.
Thanks and Regards,
Santhosh
RTF files cannot be password protected afaik.
It is possible to Restrict Editing RTF files manually. Please provide some thoughts on doing it programmatically.
Generally, when we develop a report using the tool, it is obvious that we need to add some protection to the output file to restrict editing by others. I'm sure there will be a way to do it, but couldn't able to find anything online.
Thank you!
That is MS Word internal. As long as you save this as a RTF file, any other software will ignore the (MS-specific) tags and let you happily edit the file.
If you want to protect documents, save them as docx and use VBA to set the protection.
Thanks KurtBremser for your inputs on this.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.