![]() |
|
|
|
#1
|
|||
|
|||
|
Hi there,
I don't have much experience with Word macro's, and no VBA experience at all. I have experience with scripting/coding/programming on various other platforms though. In my office a default Word document is used for the daily reports. All (about six) users open the document multiple times a day to add reports. The first person has to open the doc and do a 'save-as' with our particular date-filename-name. The original document is password encrypted (as are it's save-as-copies) since it contains sensitive info. The original document gets messed up often, because people accidentally do 'save', or accidentally change things in the formats or in the pre-typed texts or do other creative things... I tried making the document a template (.dotx). This works fine, except that the password is not passed on the the 'save-as''d document. And my users will forget/can't do it themselves. I have spend considerable time explaining how to use 'save-as' and it still goes wrong often. I am looking for a way to fix the problem without having to explain the users any new way of working... It is a challenge, yes. A way to have the password transfer to the next doc would be perfect. Somewhere I found some VBA code I tried, but Word keeps displaying macro warnings when opening the template, and I know my users with panic, even if I explain what to do. Any ideas how to tackle my problems are welcomed! Except getting new colleagues. I like them ![]() Thank you for your time. S. (Configuration: Office 365 on Windows 10/8/ & MacOS & iOS and Android phones - the doc is mailed daily to teammembers and needs to be readable on all platforms) |
|
#2
|
||||
|
||||
|
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
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
#3
|
||||
|
||||
|
Quote:
Quote:
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
| Tags |
| 365, password, template |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Deleting field boxes or removing shading in a password-protected document
|
miba54 | Word | 2 | 05-30-2018 03:00 PM |
| Creating a Password Protected Template with Macros | eking | Word | 3 | 12-20-2016 01:05 PM |
Macro to Unprotect password protected document
|
pooklet | Word | 2 | 12-08-2014 01:32 AM |
| Password protected file no longer offers password dialog on Open | htaylor | Word | 0 | 10-15-2013 12:35 PM |
| How to open a password-protected word document? | navalava | Word | 1 | 07-01-2012 12:15 PM |