macro to change part of the name of an existing Word file
I currently use the following macro to scrub, password protect, and save Word files. Each filename contains the text "(IU)". I would like to amend the macro so that it will also replace "(IU)" with "(CR)" in the filename, before saving it.
Sub ThirdPartyDocsScrubLockSaveClose()
'
' ThirdPartyDocsScrubLockSaveClose Macro
'
'
ActiveDocument.RemoveDocumentInformation (wdRDIDocumentProperties)
ActiveDocument.RemoveDocumentInformation (wdRDIDocumentServerProperties)
ActiveDocument.RemoveDocumentInformation (wdRDIContentType)
ActiveDocument.Protect Password:="12345", NoReset:=False, Type:= _
wdAllowOnlyReading, UseIRM:=False, EnforceStyleLock:=True
CommandBars("Restrict Editing").Visible = False
ActiveDocument.Save
ActiveDocument.Close
End Sub
|