#1   Report Post  
Posted to microsoft.public.word.docmanagement
Toni Toni is offline
external usenet poster
 
Posts: 23
Default Need Help With Macros

HI!, I need some help with macros. I wanted to know if there is a way to
create a macro that will run through a series of documents at the same time
by only running it once. For instance if I had a number of documents in one
folder would it be possible to run a macro in each document in the folder by
running it in the first document only and therefore make the same changes in
the rest of the documents in that folder. I hope this is clear.
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Greg Maxey[_2_] Greg Maxey[_2_] is offline
external usenet poster
 
Posts: 668
Default Need Help With Macros

See:
http://gregmaxey.mvps.org/Process_Batch_Folder.htm

Toni wrote:
HI!, I need some help with macros. I wanted to know if there is a way
to create a macro that will run through a series of documents at the
same time by only running it once. For instance if I had a number of
documents in one folder would it be possible to run a macro in each
document in the folder by running it in the first document only and
therefore make the same changes in the rest of the documents in that
folder. I hope this is clear.


--
Greg Maxey - Word MVP

My web site http://gregmaxey.mvps.org
Word MVP web site http://word.mvps.org



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Toni Toni is offline
external usenet poster
 
Posts: 23
Default Need Help With Macros

Hi Greg, that was really useful, i just want to make sure it is exactly what
I am looking for. Okay So I have 5 documents in one folder and I need the
headers to change. Would I use your Process to do that?. is there some part
of your process where I could type in the information that needed to be in
the header?

"Greg Maxey" wrote:

See:
http://gregmaxey.mvps.org/Process_Batch_Folder.htm

Toni wrote:
HI!, I need some help with macros. I wanted to know if there is a way
to create a macro that will run through a series of documents at the
same time by only running it once. For instance if I had a number of
documents in one folder would it be possible to run a macro in each
document in the folder by running it in the first document only and
therefore make the same changes in the rest of the documents in that
folder. I hope this is clear.


--
Greg Maxey - Word MVP

My web site http://gregmaxey.mvps.org
Word MVP web site http://word.mvps.org




  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Greg Maxey[_2_] Greg Maxey[_2_] is offline
external usenet poster
 
Posts: 668
Default Need Help With Macros

Yes. Basically that is all there is to it. You would open and edit the
UserDefined process in BatchProcesses.dot.

Something like this:

Function User_Defined(ByRef Doc As Word.Document) As String
On Error GoTo Err_Handler
'*******
Doc.StoryRanges(wdPrimaryHeaderStory).Text = "Header Text Here"
'*******
User_Defined = Doc.Name & " processed successfully."
Err_ReEntry:
Exit Function
Err_Handler:
User_Defined = Doc.Name & " failed to process. Error summary: " &
Err.Description & "."
Resume Err_ReEntry
End Function

Toni wrote:
Hi Greg, that was really useful, i just want to make sure it is
exactly what I am looking for. Okay So I have 5 documents in one
folder and I need the headers to change. Would I use your Process to
do that?. is there some part of your process where I could type in
the information that needed to be in the header?

"Greg Maxey" wrote:

See:
http://gregmaxey.mvps.org/Process_Batch_Folder.htm

Toni wrote:
HI!, I need some help with macros. I wanted to know if there is a
way to create a macro that will run through a series of documents
at the same time by only running it once. For instance if I had a
number of documents in one folder would it be possible to run a
macro in each document in the folder by running it in the first
document only and therefore make the same changes in the rest of
the documents in that folder. I hope this is clear.


--
Greg Maxey - Word MVP

My web site http://gregmaxey.mvps.org
Word MVP web site http://word.mvps.org


--
Greg Maxey - Word MVP

My web site http://gregmaxey.mvps.org
Word MVP web site http://word.mvps.org



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Macros have been disabled - No Macros Hugh Microsoft Word Help 2 January 14th 09 07:16 PM
Word & Enable Macros and Disable macros Theresa Microsoft Word Help 1 September 29th 08 10:38 PM
Macros Cris Microsoft Word Help 2 December 1st 07 06:23 AM
Macros Rhonda Microsoft Word Help 5 November 2nd 06 08:31 PM
With macros enabled I still receive "macros disabled" warning. Blakthorne Microsoft Word Help 6 November 1st 05 07:20 PM


All times are GMT +1. The time now is 05:07 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"