View Single Post
 
Old 09-10-2019, 04:41 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,137
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Foolproof is hardly possible but the following might help
Save the document as a macro enabled template including the following code
Code:
Option Explicit

Sub FileSave()
    If ActiveDocument.Saved = True Then
        ActiveDocument.Save
    Else
        With Dialogs(wdDialogFileSaveAs)
            .Password = "Password"
            .Show
        End With
    End If
End Sub

Sub FileSaveAs()
    With Dialogs(wdDialogFileSaveAs)
        .Password = "Password"
        .Show
    End With
End Sub
Create new documents from it and when the user saves or uses saveas the code will add the password 'Password' to the document.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote