Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
User User is offline
external usenet poster
 
Posts: 1
Default Applying password to multiple existing Word documents at one time

We have a large collection of Word documents which are classified by subject
in a number of folders.

We would like to password protect all Word documents in a folder with a
single common password and would like to do this as a bulk process, rather
than assigning a password on a document-by-document basis.

Is there a 3rd party utility which will provide for bulk assignment of a
password to multiple documents at one time?

Thanks in advance for any ideas. Document by document assignment of
password will prove very expensive in terms of labor, and such a utility
would pay for itself very quickly.


  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Applying password to multiple existing Word documents at one time

The following macro will do that. Don't forget the password!

Public Sub PasswordAll()

Dim FirstLoop As Boolean
Dim myFile As String
Dim sPassword As String
Dim PathToUse As String
Dim myDoc As Document
Dim Response As Long

PathToUse = InputBox("Path To Use?", "Path", "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


--

Graham Mayor - Word MVP

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

User wrote:
We have a large collection of Word documents which are classified by
subject in a number of folders.

We would like to password protect all Word documents in a folder with
a single common password and would like to do this as a bulk process,
rather than assigning a password on a document-by-document basis.

Is there a 3rd party utility which will provide for bulk assignment
of a password to multiple documents at one time?

Thanks in advance for any ideas. Document by document assignment of
password will prove very expensive in terms of labor, and such a
utility would pay for itself very quickly.



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
Word & WordPerfect MrsMac Microsoft Word Help 5 June 10th 06 03:14 AM
Word should allow to 'divide' page by 3 or 4, not just 2 CandasK Page Layout 2 February 28th 06 10:16 PM
How can Word display full path of a file in the title bar? SAsif Microsoft Word Help 1 January 26th 06 04:32 PM
is word perfect compatible with office word? Noreen Microsoft Word Help 1 May 11th 05 11:17 PM
Macros - Keyboard Commands Janet Microsoft Word Help 6 April 11th 05 05:28 AM


All times are GMT +1. The time now is 04:25 PM.

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"