Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
marf marf is offline
external usenet poster
 
Posts: 12
Default Word question about Macros ---- I think!

Problem Decription:

I have a word 2003 doc that is hundreds of pages long. It is a manual for a
program that my company runs every couple of years. The program is a
structured 12 month program where the participant has to follow a monthly
plan. See below:

Month 1
monthly plan, worksheets, readings, exercices, etc.

Month 2
monthly plan, worksheets, readings, exercices, etc.
..
..
..
Month 12
monthly plan, worksheets, readings, exercices, etc.

The program never starts the same month every time is offered. So for
example, this year month 1 is August, month 2 is Sept, etc.

The person in charge of the program always misses a month here and there
when she updates which causes confusion to the participants.

I would like to write a macro, where all I would have to do would be to plug
in the start month and have it update every instance of the month (staggered
by the right amount) throughtout the document. Is that possible??

  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Word question about Macros ---- I think!

It might be easier to do this as follows:
a. put the following fields at the beginning of your document (use ctrl-F9
to insert every pair of Special field code braces { }, and use Alt-F9 to
show/hide your field codes)

{ SET StartMonthNumber 3 }{ SEQ mnum \r{ =MOD(12-{ REF
StartMonthNumber },12 } \h }{ SEQ mname \r0 \h }

Put a second set of fields immediately afterwards (no paragraph marks!)

{ SET "m{ = MOD({ SEQ mnum },12)+1 }" { QUOTE 2008-{ SEQ mname }-01
\@MMMM } }

Copy the second set of fields 11 times (so that there are 12 sets
altogether). No paragraph marks!

Select them all and press F9 to re-execute them

Everywhere you need a month number 1, use the field code { m1 } ( or { REF
m1 } instead. As things stand, { m1 } should evaluate to "March"

When you do the next year's plan,
a. use Alt-F9 to reveal the field codes
b. change the "3" in the first field to be the number of your start month,
e.g. if month 1 should be August, set it to 8
c. Use Alt-F9 to hide the field codes
d. select the document and press F9.

If you use the month numbers in headers/footers or other things that are not
in the "main text stream" of the document, you may need a small macro that
updates fields everywhere in the document/

Now all you have to do is locate all the places where someone has entered a
month number directly, rather than using { mmonthnumber }. But I think you
will have that particular problem whatever you do.

There are other approaches that work along similar lines that you could use,
but I think this one is not a bad combination from an ease of creation and
use point of view.

--
Peter Jamieson
http://tips.pjmsn.me.uk

"marf" wrote in message
...
Problem Decription:

I have a word 2003 doc that is hundreds of pages long. It is a manual for
a
program that my company runs every couple of years. The program is a
structured 12 month program where the participant has to follow a monthly
plan. See below:

Month 1
monthly plan, worksheets, readings, exercices, etc.

Month 2
monthly plan, worksheets, readings, exercices, etc.
.
.
.
Month 12
monthly plan, worksheets, readings, exercices, etc.

The program never starts the same month every time is offered. So for
example, this year month 1 is August, month 2 is Sept, etc.

The person in charge of the program always misses a month here and there
when she updates which causes confusion to the participants.

I would like to write a macro, where all I would have to do would be to
plug
in the start month and have it update every instance of the month
(staggered
by the right amount) throughtout the document. Is that possible??


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
disabling macros question Kim K Microsoft Word Help 3 January 24th 08 01:30 PM
Enable Macros Question awrex Microsoft Word Help 1 October 24th 06 01:40 AM
How the macros can be put to use in MS Word? Sameer Kulkarni Microsoft Word Help 1 May 3rd 06 12:48 PM
With macros enabled I still receive "macros disabled" warning. Blakthorne Microsoft Word Help 6 November 1st 05 07:20 PM
macros in Word M@ Microsoft Word Help 2 September 27th 05 07:21 PM


All times are GMT +1. The time now is 03:01 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"