A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Auto Number after mail merge



 
 
Thread Tools Display Modes
  #1  
Old September 6th, 2009, 08:31 PM posted to microsoft.public.word.mailmerge.fields
sg
external usenet poster
 
Posts: 61
Default Auto Number after mail merge

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.
  #2  
Old September 7th, 2009, 08:04 AM posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
external usenet poster
 
Posts: 4,550
Default Auto Number after mail merge

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.

  #3  
Old September 8th, 2009, 03:27 AM posted to microsoft.public.word.mailmerge.fields
sg
external usenet poster
 
Posts: 61
Default Auto Number after mail merge

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.


  #4  
Old September 8th, 2009, 04:03 AM posted to microsoft.public.word.mailmerge.fields
sg
external usenet poster
 
Posts: 61
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.


  #5  
Old September 8th, 2009, 04:06 AM posted to microsoft.public.word.mailmerge.fields
sg
external usenet poster
 
Posts: 61
Default Auto Number after mail merge

I should also point out that if the first option on this list is not checked,
none of the others shows up either.

"sg" wrote:

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.

  #6  
Old September 8th, 2009, 04:53 AM posted to microsoft.public.word.mailmerge.fields
sg
external usenet poster
 
Posts: 61
Default Auto Number after mail merge

Sorry to keep writing back...I had a brainstorm and it fixed my problem. I
took out the next field and now it works fine...except...

I am having issues with the formatting, though. It wants to put everything
together and won't let me set any tabs, etc. for what is there. I put in
tabs, but when I open the document again, that is all gone. Can I put tabs
in the code to set them in a certain place?

"sg" wrote:

I should also point out that if the first option on this list is not checked,
none of the others shows up either.

"sg" wrote:

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.

  #7  
Old September 8th, 2009, 09:34 AM posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
external usenet poster
 
Posts: 4,550
Default Auto Number after mail merge

I haven't checked this particular feature and I'm not certain that I
have got the point, but...

Tab formatting (i.e. the type of tab and the position they tab to) are
part of the paragraph (or paragraph style) formatting, and in Word tthat
is associated with the paragraph mark at the end of the paragraph. The
thing is that when you nsert text conditionally using IF fields, there's
the formatting of the text inside the IF, and there's the formatting
of the text that results from the IF, and
a. if you aren't doing it already, it is usually easier to use the
"picrow" (reverse-P) button in the formatting toolbar or the Home tab
(Word 2007) to view characters such as paragraph marks, tabs etc.
b. you (probably) need to ensure that the formatting is applied to the
paragraph mark that you see inside the IF field rather than to the
result of the IF field.
c. At the moment, for one reason and another, we are currently
inserting paragraph markers /before/ each text line. It may be easier to
switch that around so that the paragraph mark appears after the text you
want to insert.


Peter Jamieson

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

sg wrote:
Sorry to keep writing back...I had a brainstorm and it fixed my problem. I
took out the next field and now it works fine...except...

I am having issues with the formatting, though. It wants to put everything
together and won't let me set any tabs, etc. for what is there. I put in
tabs, but when I open the document again, that is all gone. Can I put tabs
in the code to set them in a certain place?

"sg" wrote:

I should also point out that if the first option on this list is not checked,
none of the others shows up either.

"sg" wrote:

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.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:45 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.