Reply
 
Thread Tools Display Modes
  #1   Report Post  
Ant
 
Posts: n/a
Default How to password protect a bunch of Word document files at once?

Hello.

Is there a way to password protect a group of Word document files at
once? Doing one by one with save as and its password options is a pain.
This is with Word 2000 SP3 (all updates) in Windows 98 SE.

Thank you in advance.
--
"Is this stuff any good for ants?" "No, it kills them." --unknown
/\___/\
/ /\ /\ \ Phillip (Ant) @ http://antfarm.ma.cx & http://aqfl.net
| |o o| | E-mail (nuke ANT if replying privately to a newsgroup
\ _ / post): NT or
( )
Ant is currently not listening to any songs on his home computer.
  #2   Report Post  
Graham Mayor
 
Posts: n/a
Default

Only with a macro. The following will do the job on a folder full of files.
Put the path to that folder where indicated:
http://www.gmayor.com/installing_macro.htm

Public Sub PasswordAll()

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

'*************************************
'Set the required path here
PathToUse = "C:\Path\"
'*************************************
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




Ant wrote:
Hello.

Is there a way to password protect a group of Word document files at
once? Doing one by one with save as and its password options is a
pain. This is with Word 2000 SP3 (all updates) in Windows 98 SE.

Thank you in advance.



  #3   Report Post  
Ant
 
Posts: n/a
Default

Do I assume this will work on USB Flash drives where all the documents are?


On 2/28/2005 12:28 AM PT, Graham Mayor wrote:

Only with a macro. The following will do the job on a folder full of files.
Put the path to that folder where indicated:
http://www.gmayor.com/installing_macro.htm

Public Sub PasswordAll()

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

'*************************************
'Set the required path here
PathToUse = "C:\Path\"
'*************************************
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

--
"Caution is not cowardice; even the ants march armed." --Ugandan Proverb
/\___/\
/ /\ /\ \ Phillip (Ant) @ http://antfarm.ma.cx & http://aqfl.net
| |o o| | E-mail (nuke ANT if replying privately to a newsgroup
\ _ / post): NT or
( )
Ant is currently not listening to any songs on his home computer.
  #4   Report Post  
Doug Robbins
 
Posts: n/a
Default

If you have plenty of space on the USB drive you may be OK. For complete
peace of mind however, you would be well advised to create a folder on the
hard disk and copy all of the files into that folder and password protect
them there and after verifying everything is OK, copy them back to the USB
drive.

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
"Ant" wrote in message
...
Do I assume this will work on USB Flash drives where all the documents
are?


On 2/28/2005 12:28 AM PT, Graham Mayor wrote:

Only with a macro. The following will do the job on a folder full of
files.
Put the path to that folder where indicated:
http://www.gmayor.com/installing_macro.htm

Public Sub PasswordAll()

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

'*************************************
'Set the required path here
PathToUse = "C:\Path\"
'*************************************
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

--
"Caution is not cowardice; even the ants march armed." --Ugandan Proverb
/\___/\
/ /\ /\ \ Phillip (Ant) @ http://antfarm.ma.cx & http://aqfl.net
| |o o| | E-mail (nuke ANT if replying privately to a newsgroup
\ _ / post): NT or
( )
Ant is currently not listening to any songs on his home computer.



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
Specific Email Merge w/ Specific Attachements Mark B Mailmerge 9 February 21st 05 05:10 AM
Basic macros query - where are they assigned to? Bert Coules New Users 15 January 18th 05 12:28 PM
How do I create & merge specific data base & master documents? maggiev New Users 2 January 12th 05 11:30 PM
Macro that will add the file path & date to Word footnotes? Rich P Microsoft Word Help 2 December 15th 04 07:49 PM
How do I convert a cd in word perfect to microsoft word greylady Microsoft Word Help 1 November 23rd 04 07:03 PM


All times are GMT +1. The time now is 09:15 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"