ZPath = Space$(512) '*** Parse the result *** LRetVal = SHBrowseForFolder(bInfo) '*** Display the dialog *** Public Function zGetDirectory(Optional Msg) As Stringĭim lRetVal2 As Long, lRetVal As Long, iEndOfStr As IntegerīInfo.pidlRoot = 0 '*** Root folder = Desktop ***īInfo.lpszTitle = "Select a Drive/Directory."īInfo.ulFlags = &H1 '*** Type of directory to return *** 'Notes: This function will bring up a form to let the user select a directory MsgBox "Error No: " & Err.Number & vbCrLf & _ VbOKOnly + vbCritical, "Error: File Not Found" MsgBox "The file: " & zPWDPassFile & " was not found!", _ Set oDocToPW = Documents.Open(zProcessDir & "" & zNextFile)ĭebug.Print zProcessDir & "" & zNextFile & " PW: " & zPWD ZPWDPassFile = "G:TestWDpassTestRandPassWds.txt" '-|Windows Function Declarations|-| 08/11/05 |ĭeclare Function SHGetPathFromIDList Lib "shell32.dll" _Īlias "SHGetPathFromIDListA" (ByVal pidl As Long, _ĭeclare Function SHBrowseForFolder Lib "shell32.dll" _Īlias "SHBrowseForFolderA" (lpBrowseInfo As BROWSEINFO) As Long “the rest of the files in this folder”, vbYesNo) Response = MsgBox(“Do you want to process ” & _ Set myDoc = Documents.Open(PathToUse & myFile) PathToUse = InputBox(“Path To Use?”, “Path”, “D:My DocumentsTestMerge”)ĭocuments.Close SaveChanges:=wdPromptToSaveChanges Any ideas? Secondly is there any way to do this a have a different password set for each document? Thank you for any help with this! To give credit where credit is do this particular macro was posted on several sites by Graham Mayor. I have found several macros similar to the following, but none of them seem to work on 2010. I am trying to password protect a large quantity of word files using 2010.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |