PC Review


Reply
Thread Tools Rate Thread

apply a common password for multiple word documents

 
 
kesk
Guest
Posts: n/a
 
      14th Jan 2008
Dear All,

I have a series of documents, which i want to protect with passwords.
Opening individual files and then entering a password is going to be
difficult since i have 100s of them. Is it possible ?

Any idea would be welcome.

kesk


 
Reply With Quote
 
 
 
 
Graham Mayor
Guest
Posts: n/a
 
      14th Jan 2008
Put copies of the documents you want to protect in a separate folder and run
the following macro on that folder having first set the required password in
the line
strPassword = "password"
Ensure that you can open the documents with that password before removing
the original unprotected versions.
Don't forget the password!
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

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



Sub BatchSetPassword()
Dim myFile As String
Dim PathToUse As String
Dim MyDoc As Document
Dim iFld As Integer
Dim strPassword As String
strPassword = "password"

With Dialogs(wdDialogCopyFile)
If .Display <> 0 Then
PathToUse = .Directory
Else
MsgBox "Cancelled by User"
Exit Sub
End If
End With
If Documents.Count > 0 Then
Documents.Close savechanges:=wdPromptToSaveChanges
End If
If Left(PathToUse, 1) = Chr(34) Then
PathToUse = Mid(PathToUse, 2, Len(PathToUse) - 2)
End If
myFile = Dir$(PathToUse & "*.do?")
While myFile <> ""
Set MyDoc = Documents.Open(PathToUse & myFile)
MyDoc.Password = strPassword
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
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

kesk wrote:
> Dear All,
>
> I have a series of documents, which i want to protect with passwords.
> Opening individual files and then entering a password is going to be
> difficult since i have 100s of them. Is it possible ?
>
> Any idea would be welcome.
>
> kesk



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
apply modified style for multiple documents =?Utf-8?B?QkFI?= Microsoft Word Document Management 5 22nd Jul 2007 07:36 AM
Updating common elements across multiple documents =?Utf-8?B?RGlvbiBTdGFyZmlyZQ==?= Microsoft Word New Users 2 3rd Nov 2006 09:48 PM
Applying password to multiple existing Word documents at one time User Microsoft Word Document Management 1 22nd Sep 2006 03:52 PM
Apply template to multiple documents (for printing) =?Utf-8?B?R2FyZGFy?= Microsoft Word Document Management 4 9th Sep 2006 12:27 AM
How can I apply a template to multiple documents? matt ross via OfficeKB.com Microsoft Word New Users 1 31st Jan 2005 05:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:45 PM.