View Single Post
  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
SG SG is offline
external usenet poster
 
Posts: 19
Default Auto Number after mail merge

Well somehow I got the error to go away - I seriously don't know what I did,
but it is working for the first entry, but not the additional entries. I
have looked and looked again and I have them all set up the same way...no
differences...

Any ideas?

"sg" wrote:

Thank you for your quick reply. I tried what you said...ended up with the
following (using my own field names, etc.). Now I get an error:
Error! Unknown op code for conditional.

What does that mean? I've double-checked that I have everything correct and
am using the paragraphs where you said and the tab where you said...



"Peter Jamieson" wrote:

Try the following:

before the optional lines, put

{ SET C 2 }

For the optional lines use

{ IF { MERGEFIELD checked } = 1 "
{ SET C { = C + 1 } }{ C }.tabwhatever fields and text you need" }{
NEXT }{ IF { MERGEFIELD checked } = 1 "
{ SET C { = C + 1 } }{ C }.tabwhatever fields and text you need" }{
NEXT }{ IF { MERGEFIELD checked } = 1 "
{ SET C { = C + 1 } }{ C }.tabwhatever fields and text you need" }{
NEXT }{ IF { MERGEFIELD checked } = 1 "
{ SET C { = C + 1 } }{ C }.tabwhatever fields and text you need" }{
NEXT }{ IF { MERGEFIELD checked } = 1 "
{ SET C { = C + 1 } }{ C }.tabwhatever fields and text you need" }{ NEXT }

whe
a. you'll need to replace { MERGEFIELD checked } = 1 by the
appropriate comparison for your data
b. there is a paragraph mark immediately after this
{ IF { MERGEFIELD checked } = 1 "
and each of these
NEXT }{ IF { MERGEFIELD checked } = 1 "
c. you put a tab character where I have put tab

Peter Jamieson

http://tips.pjmsn.me.uk
Visit Londinium at http://www.ralphwatson.tv

sg wrote:
I have a Word document that has a numbered list already existing in it. The
first two items in the list will always be there, but items 4-8 may or may
not be depending on data pulled from an Access database.

The database is set up with a checkbox for each of the 5 items that are
variable. In the Word document, I would like it to use the numbered list
only for those that are checked.

The problem I am having is that the lines where no text is being pulled in
are still being numbered which makes sense because a field has still been
placed there, it just doesn't have any data to show.

I have tried using the SKIPIF as well as IF THEN ELSE to have it only pull
the text if it exists, but am still not able to get the numbers to disappear.
I have also tried inserting the numbers with SEQ and LISTNUM instead of the
regular numbered list option, but am still not able to get the line of text
to go away.

Hopefully I am explaining this without being too confusing. Is this
possible?

Thank you in advance for any help.