Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
JollyMike JollyMike is offline
external usenet poster
 
Posts: 1
Default Problems numbering a mailmerge doc with condtional paragraphs

I am having more than a headache while attempting to autonumber my paragraphs
in a Mergedoc. My document contains conditional paragraphs that are within
IF statements. e.g. 24) blah blah blah {IF {MERGEFIELD asdf} = "True" " 25)
blah blah blah" "" 26) blah blah blah. What I need to do is automatically
renumber paragraphs based on the conditional paragraphs. My document is 26
pages (not including mergecode) and contains 50+ numbered paragraphs
(sections) many of which are conditional. This makes renumbering the entire
document every time I have a conditional paragraph undesirable. I have tried
the {SEQ} method of numbering (which doesn't like IF statements) as well as
normal autonumbering. Nothing has worked for me. Please help, I am running
out of aspirin.

Thx

My Document is laid out as such:

1) unconditional
2) unconditional
3) conditional
4) unconditional
5) conditional
6) conditional
7) unconditional...and so on
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Problems numbering a mailmerge doc with condtional paragraphs

Hi Jollymike,

I see you've posted the same question in multiple forums. Please see: http://www.excelguru.ca/node/7

As for the solution, you could use a series of fields coded along the lines of:
{SET Para 0}¶
{QUOTE "{SET Para {=Para+1}}{=Para}"}¶
and
{IF{MERGEFIELD MyOption1}= "Print" "{SET Para {=Para+1}}{REF Para} Optional Text¶
"}
The first field re-sets a 'Para' numbering bookmark to 0 for each mailmerge record.
The second field updates the 'Para' numbering bookmark and displays the paragraph number for paragraphs of required text. You add
the required text before the paragraph mark.
The third field optionally increments the paragraph count and inserts the optional text, if the relevant mergefield (in this
example, named MyOption1) contains the string 'Print'. Change both the field name and the condition to suit your requirements. Note
that, for the optional text, the final paragraph mark is within the field code. That's because the paragraph mark is suppressed if
there's no text to display. The fields for the optional fields are thus appended to the following paragraph. This means you could
have multiple optional fields all pre-pending a required paragraph. For example:
{QUOTE "{SET Para {=Para+1}}{=Para}"} Required Text¶
{IF{MERGEFIELD MyOption1}= "Print" "{SET Para {=Para+1}}{REF Para} Optional Text¶
"}{IF{MERGEFIELD MyOption2}= "Print" "{SET Para {=Para+1}}{REF Para} Optional Text¶
"}{IF{MERGEFIELD MyOption3}= "Print" "{SET Para {=Para+1}}{REF Para} Optional Text¶
"}{QUOTE "{SET Para {=Para+1}}{=Para}"} Required Text¶

--
Cheers
macropod
[Microsoft MVP - Word]


"JollyMike" wrote in message ...
I am having more than a headache while attempting to autonumber my paragraphs
in a Mergedoc. My document contains conditional paragraphs that are within
IF statements. e.g. 24) blah blah blah {IF {MERGEFIELD asdf} = "True" " 25)
blah blah blah" "" 26) blah blah blah. What I need to do is automatically
renumber paragraphs based on the conditional paragraphs. My document is 26
pages (not including mergecode) and contains 50+ numbered paragraphs
(sections) many of which are conditional. This makes renumbering the entire
document every time I have a conditional paragraph undesirable. I have tried
the {SEQ} method of numbering (which doesn't like IF statements) as well as
normal autonumbering. Nothing has worked for me. Please help, I am running
out of aspirin.

Thx

My Document is laid out as such:

1) unconditional
2) unconditional
3) conditional
4) unconditional
5) conditional
6) conditional
7) unconditional...and so on


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
Problems numbering a mailmerge doc with condtional (IF statement)paragraphs xhjk Mailmerge 0 August 13th 09 10:21 PM
Numbering of paragraphs Tamlyn Microsoft Word Help 1 June 20th 08 09:55 PM
Numbering paragraphs? Numbering sentences? Zak[_2_] New Users 1 August 7th 07 01:50 AM
Numbering Paragraphs Thersites Microsoft Word Help 4 January 16th 07 12:01 PM
Numbering Paragraphs DeanH Microsoft Word Help 3 August 13th 05 04:10 AM


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