View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sprinks Sprinks is offline
external usenet poster
 
Posts: 86
Default Checking HasPassword property without opening

Looping through a FileSearch.FoundFiles object's collection, I have all the
filenames in a given directory. If the file has a password, I'd like to
change it to a new value. Can I do this without opening the file?

' pseudocode
Dim fs as FileSearch
If (the workbook corresponding to fs.FoundFiles(i)).HasPassword Then
Open
.Password = strNew
.Save
.Close
End If

Can anyone help?
Sprinks