Hi, I have an Excel macro which opens a Word template and fills in fields from the Excel data.
The code I have used to open the template is as follows:
It took me a long time to successfully find a way to open/add data, so I would like to preserve this method if possible. It is also working well.
Now I would like to protect the Word document as it is getting corrupted by having multiple users. I tried to add a password but was not successful with the following:
Any advice on how to automate the password entry when opening the Word doc?
Many thanks!
Paul
The code I have used to open the template is as follows:
VBA Code:
' open custom Template
Set wrdDoc = wrdApp.Documents.Add(Template:="G:\filepath\Coordination.docx")
It took me a long time to successfully find a way to open/add data, so I would like to preserve this method if possible. It is also working well.
Now I would like to protect the Word document as it is getting corrupted by having multiple users. I tried to add a password but was not successful with the following:
VBA Code:
' open custom Template
Set wrdDoc = wrdApp.Documents.Add(Template:="G:\filepath\Coordination.docx", PassowrdDocument:="password")
Any advice on how to automate the password entry when opening the Word doc?
Many thanks!
Paul