catlop.blogg.se

Me word doc password protect
Me word doc password protect






me word doc password protect
  1. ME WORD DOC PASSWORD PROTECT HOW TO
  2. ME WORD DOC PASSWORD PROTECT CODE

With Application.Dialogs(wdDialogFileSaveAs) 'ActiveDocument.password = TextBoxPassword.Text 'it works when this line is present, then the password field is pre-filled MsgBox "Password is " & TextBoxPassword.Text 'just for debug reasons to see if the password is properly read

me word doc password protect

Private Sub ButtonSaveWithPassword_Click() Private Sub ButtonOnlySetPassword_Click()ĪctiveDocument.password = TextBoxPassword.Text

ME WORD DOC PASSWORD PROTECT CODE

The code to either set a password only or directly save the document with a password looks like this: 'in TemplateProject > Forms > DialogSetPassword The user form DialogSetPassword looks like this: This is the startup code, when creating a new document from the Word template: 'in TemplateProject > Microsoft Word Objects > ThisDocument

ME WORD DOC PASSWORD PROTECT HOW TO

So the question is: how to use a macro to open a save dialog for saving a document with password encryption turned on for a given password? Startup Code

me word doc password protect

I'm able to " only set a password" but the dialog for the "file > save as" function with the enum wdDialogFileSaveAs does not seem to work as it is said in the official documentation. The startup code is properly executed and also the user form works as expected. This password should then be used to encrypt the new document created from the template. I created a Word template with some VBA macro to prompt the user to enter a password.








Me word doc password protect