#1   Report Post  
mam1413
 
Posts: n/a
Default Password protect files

Is there a way to password protect a whole group of Word files all at one
time with the same password instead of having to open each file and apply
password protection?
  #2   Report Post  
Graham Mayor
 
Posts: n/a
Default

You can do this with a macro e.g.

Public Sub PasswordAll()

Dim FirstLoop As Boolean
Dim myFile, Password, PathToUse As String
Dim myDoc As Document
Dim Response As Long

PathToUse = "D:\My Documents\Test\Merge\"
sPassword = InputBox("Enter Password")

On Error Resume Next
Documents.Close Savechanges:=wdPromptToSaveChanges
FirstLoop = True
myFile = Dir$(PathToUse & "*.doc")
While myFile ""
Set myDoc = Documents.Open(PathToUse & myFile)
If FirstLoop Then
With ActiveDocument
.Password = sPassword
.WritePassword = sPassword
End With
FirstLoop = False

Response = MsgBox("Do you want to process " & _
"the rest of the files in this folder", vbYesNo)
If Response = vbNo Then Exit Sub
Else
With ActiveDocument
.Password = sPassword
.WritePassword = sPassword
End With
End If
myDoc.Close Savechanges:=wdSaveChanges
myFile = Dir$()
Wend
End Sub

Change the path to that where you have stored the documents.
Practice with *copies* of the documents and set the backup option to be on
the safe side until you are happy this works for you.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org





mam1413 wrote:
Is there a way to password protect a whole group of Word files all at
one time with the same password instead of having to open each file
and apply password protection?



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
protect folders and not just files Craigos Microsoft Word Help 5 June 23rd 05 08:06 AM
Password Protect Documents Valley Microsoft Word Help 0 April 19th 05 06:44 PM
Keep password protected Word files from being read by Google Desk. weteca Microsoft Word Help 0 March 8th 05 02:39 AM
How to password protect a bunch of Word document files at once? Ant New Users 3 February 28th 05 10:34 AM
Password protect documents whitedove Microsoft Word Help 5 November 25th 04 12:26 PM


All times are GMT +1. The time now is 11:53 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"