Changing the author on over 100 Docs

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have over 100 docs that have the Author under my old name. I have changed
my name and want to change all my docs to display my new name. Is there an
efficient
way of doing this?
 
Or you could use a bit of VBA to open each document and change the
Author. First place all of the files in a common directory. In this
example is used:

C:\Batch Folder

Public Sub BatchChangeProperty()

Dim myFile As String
Dim PathToUse As String
Dim myDoc As Document

PathToUse = "C:\Batch Folder\"
'Close all open documents before beginning
On Error Resume Next
Documents.Close SaveChanges:=wdPromptToSaveChanges
On Error GoTo 0
'Set the directory and type of file to batch process
myFile = Dir$(PathToUse & "*.doc")
While myFile <> ""
'Open document
Set myDoc = Documents.Open(PathToUse & myFile)
'Make the change
ActiveDocument.BuiltInDocumentProperties("Author").Value = "Your new
name"
'Close the modified document after saving changes
myDoc.Close SaveChanges:=wdSaveChanges
'Next file in folder
myFile = Dir$()
Wend
End Sub
 
So I would create this file in notepad and give it a .bat extention?
Or how do I create this VBA file? Just a little over my head.
And what else to I have to change in this script besides "your new name"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top