Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Changing the author on over 100 Docs

2 views
Skip to first unread message

Cali Tech

unread,
Feb 13, 2006, 11:28:48 AM2/13/06
to
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?

Suzanne S. Barnhill

unread,
Feb 13, 2006, 11:47:36 AM2/13/06
to
See http://word.mvps.org/faqs/macrosvba/DSOFile.htm

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Cali Tech" <Cali...@discussions.microsoft.com> wrote in message
news:ABF3D447-5C50-4B76...@microsoft.com...

Greg

unread,
Feb 13, 2006, 12:04:16 PM2/13/06
to
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

Cali Tech

unread,
Feb 13, 2006, 3:39:26 PM2/13/06
to
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"

Greg

unread,
Feb 13, 2006, 4:26:25 PM2/13/06
to
See:
http://www.gmayor.com/installing_macro.htm
for help using the macro.

You would need to change "C:\Batch Folder" to the directory where you
group of files is located or you could simply create a directory of
that name and move your files there to process. That is what I do.

0 new messages