Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Bruce Bumbier Bruce Bumbier is offline
external usenet poster
 
Posts: 2
Default password removal from multiple docs

How do you remove the password from multiple Word docs without having to open
each one and go to 'Tools'-'Options'-'Security' and delete the password??
--
Bruce Bumbier
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default password removal from multiple docs

If the documents have the *same* passwords then you can use a batch macro to
open all the protected documents in a folder and reset the passwords to
none - something like the following. Copy all the common password protected
files to a temporary folder before running the macro.

Public Sub UnPasswordAll()

Dim FirstLoop As Boolean
Dim strFileName As String
Dim sPassword1 As String
Dim sPassword2 As String
Dim strPath As String
Dim oDoc As Document
Dim Response As Long
Dim fDialog As FileDialog

Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)

With fDialog
.Title = "Select folder and click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show -1 Then
MsgBox "Cancelled By User", , "Password"
Exit Sub
End If
strPath = fDialog.SelectedItems.Item(1)
If Right(strPath, 1) "\" Then strPath = strPath + "\"
End With

sPassword1 = InputBox("Enter Password to open Document")
sPassword2 = InputBox("Enter Password to edit Document")


On Error Resume Next
Documents.Close SaveChanges:=wdPromptToSaveChanges
FirstLoop = True

strFileName = Dir$(strPath & "*.doc")
While strFileName ""
Set oDoc = Documents.Open(strPath & strFileName, _
PasswordDocument:=sPassword1, _
WritePasswordDocument:=sPassword2)
If FirstLoop Then
With ActiveDocument
.Password = ""
.WritePassword = ""
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 = ""
.WritePassword = ""
End With
End If
oDoc.Close SaveChanges:=wdSaveChanges
strFileName = Dir$()
Wend
End Sub

http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

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



Bruce Bumbier wrote:
How do you remove the password from multiple Word docs without having
to open each one and go to 'Tools'-'Options'-'Security' and delete
the password??



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
How to password protect multiple exisitng doc files at one time Sparky Microsoft Word Help 5 May 10th 23 08:50 AM
if I know the password, how do I remove it from a large no of docs? [email protected] Microsoft Word Help 7 January 14th 08 09:50 PM
apply a common password for multiple word documents kesk Microsoft Word Help 1 January 14th 08 12:05 PM
Applying password to multiple existing Word documents at one time User Microsoft Word Help 1 September 22nd 06 03:52 PM
Multiple docs open multiple words Ron Smith New Users 2 December 11th 04 09:21 PM


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