Microsoft Office Forums Looking for ideas for a foolproof password-protected template/document

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-10-2019, 12:39 AM
Sarcas Sarcas is offline Looking for ideas for a foolproof password-protected template/document Windows 10 Looking for ideas for a foolproof password-protected template/document Office 2016
Novice
Looking for ideas for a foolproof password-protected template/document
 
Join Date: Sep 2019
Posts: 1
Sarcas is on a distinguished road
Default Looking for ideas for a foolproof password-protected template/document

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)
Reply With Quote
  #2  
Old 09-10-2019, 04:41 AM
gmayor's Avatar
gmayor gmayor is offline Looking for ideas for a foolproof password-protected template/document Windows 10 Looking for ideas for a foolproof password-protected template/document Office 2016
Expert
 
Join Date: Aug 2014
Posts: 2,957
gmayor is just really nicegmayor is just really nicegmayor is just really nicegmayor is just really nice
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
  #3  
Old 09-11-2019, 01:21 AM
macropod's Avatar
macropod macropod is offline Looking for ideas for a foolproof password-protected template/document Windows 7 64bit Looking for ideas for a foolproof password-protected template/document Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,577
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

Quote:
Originally Posted by Sarcas View Post
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...
That's because you're not using a template.
Quote:
Originally Posted by Sarcas View Post
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.
If you used a dotm template, you could add a macro to it to apply/require a password on saving. The output documents, could remain in the docx format.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
Reply

Tags
365, password, template

Thread Tools
Display Modes


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
Looking for ideas for a foolproof password-protected template/document 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


All times are GMT -7. The time now is 05:15 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft