Re: How to password protect a bunch of Word document files at once?

From: Doug Robbins (dkr_at_NOmvpsSPAM.org)
Date: 02/28/05


Date: Mon, 28 Feb 2005 05:34:13 -0500

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" <philpi@earthlink.netANT> wrote in message 
news:u$YTb8XHFHA.1476@TK2MSFTNGP09.phx.gbl...
> 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): philpi@earthlink.netANT or ANTant@zimage.com
>      ( )
> Ant is currently not listening to any songs on his home computer. 


Relevant Pages

  • RE: sharing files from my removable HD to xbox360
    ... i just deicided to check my xbox and its reading the folder now. ... Added my entire USB drive to the monitored folders list. ... I'll let the developer who owns Media Sharing know about the problem you're ... reason for me to have all my songs on both drives so i dont want to have to ...
    (microsoft.public.windowsmedia.player)
  • Re: Checking multiple locations for folder using IF statement
    ... I am not seeing the problem, Ron. ... It will loop through all drives from L: to Z: looking ... Dim fixedpath As String ... So, what I'm trying to do is open a folder, if it exists. ...
    (microsoft.public.access.formscoding)
  • Re: Checking multiple locations for folder using IF statement
    ... It will loop through all drives from L: to Z: looking ... Dim fixedpath As String ... Dim blnFoundPath ... So, what I'm trying to do is open a folder, if it exists. ...
    (microsoft.public.access.formscoding)
  • Re: Checking multiple locations for folder using IF statement
    ... It will loop through all drives from L: to Z: looking ... Dim fixedpath As String ... Dim blnFoundPath ... So, what I'm trying to do is open a folder, if it exists. ...
    (microsoft.public.access.formscoding)
  • Re: Checking multiple locations for folder using IF statement
    ... It will loop through all drives from L: to Z: looking ... Dim fixedpath As String ... Dim blnFoundPath ... So, what I'm trying to do is open a folder, if it exists. ...
    (microsoft.public.access.formscoding)