Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-11-2018, 03:43 PM
justinmo justinmo is offline macro to change part of the name of an existing Word file Windows 10 macro to change part of the name of an existing Word file Office 2016
Novice
macro to change part of the name of an existing Word file
 
Join Date: Sep 2018
Posts: 7
justinmo is on a distinguished road
Default 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
Reply With Quote
 

Tags
modify filename



Similar Threads
Thread Thread Starter Forum Replies Last Post
macro to change part of the name of an existing Word file Inserting Only Part of File Name in Word ClaireLivings Word 1 04-14-2016 08:08 AM
macro to change part of the name of an existing Word file how to make navigation part closed when we open our existing MS word document Deniz Word 1 02-28-2016 09:01 AM
Change color of existing borders for an existing table JayUSA PowerPoint 1 01-21-2016 04:21 PM
Change one page number in existing TOC Word 2013 MK-NY Word 2 04-03-2014 03:59 AM
hey guys, need to edit a certain part of a word file but its greyed out winter83 Word 0 08-17-2010 07:04 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:13 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft