Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Bruce Bruce is offline
external usenet poster
 
Posts: 54
Default Word if...then statement using merge field = invalid Merge field?

Hi,

I am performing a mailmerge from within the Pegasus Opera II System. This
calls on Word for the mailmerge and you finish it off in there. In the
Pegasus software you set up custome fields. These are then available to
select when you set up the mail merge field. I have a field called Cat. It
could have4 predefined catalogues depending on selection.
In the merge document I used the if statement to say that if the field = a
specific name, then make a X in the box. I have 4 of these on the document
each for a different caqtalogue.
When I run the merge, it pops up an error message Invalid Merge Field: This
merge field is used in the main document, but it does not exist in the
datasourse. I have options to remove the field, or replace with a field from
a drop down which only give AutoMergeFields and then OK or cancel.
If I click on the cancel continuously, the merge comes up and the if
statement did what it was suppose to do.
Problem is if I have a 100 documents to send, I have to click 12 times per
document, equating to a 1200 click. Time consuming.
Any ideas please

Regards,

Bruce Kidd

  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Word if...then statement using merge field = invalid Merge field?

Which version of Word is this? And do you know exactly what data source
the Word document is connecting to? (It sounds as if Pegasus may be
generating something then connecting the word document to it).

I am surprised that you are only seeing AutoMergeField names listed but
the merge still functions correctly with other field names.


Peter Jamieson

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

Bruce wrote:
Hi,

I am performing a mailmerge from within the Pegasus Opera II System. This
calls on Word for the mailmerge and you finish it off in there. In the
Pegasus software you set up custome fields. These are then available to
select when you set up the mail merge field. I have a field called Cat. It
could have4 predefined catalogues depending on selection.
In the merge document I used the if statement to say that if the field = a
specific name, then make a X in the box. I have 4 of these on the document
each for a different caqtalogue.
When I run the merge, it pops up an error message Invalid Merge Field: This
merge field is used in the main document, but it does not exist in the
datasourse. I have options to remove the field, or replace with a field from
a drop down which only give AutoMergeFields and then OK or cancel.
If I click on the cancel continuously, the merge comes up and the if
statement did what it was suppose to do.
Problem is if I have a 100 documents to send, I have to click 12 times per
document, equating to a 1200 click. Time consuming.
Any ideas please

Regards,

Bruce Kidd

  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Bruce Bruce is offline
external usenet poster
 
Posts: 54
Default Word if...then statement using merge field = invalid Merge fie

This happens on my system in Word 2007 and at my customer in Word 2003. Not
sure what the data source is?? Pegasus OII is written in Visual Foxpro 9 if
that is what you are looking for.
It should not work, but once I clicked on the cancel button - 3x for each
merge field in the if statements - it is correct. As soon as I take the If
statement out, the document has no problem.

Thanks for responding, I have been struggeling with this for weeks.


Bruce Kidd



"Peter Jamieson" wrote:

Which version of Word is this? And do you know exactly what data source
the Word document is connecting to? (It sounds as if Pegasus may be
generating something then connecting the word document to it).

I am surprised that you are only seeing AutoMergeField names listed but
the merge still functions correctly with other field names.


Peter Jamieson

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

Bruce wrote:
Hi,

I am performing a mailmerge from within the Pegasus Opera II System. This
calls on Word for the mailmerge and you finish it off in there. In the
Pegasus software you set up custome fields. These are then available to
select when you set up the mail merge field. I have a field called Cat. It
could have4 predefined catalogues depending on selection.
In the merge document I used the if statement to say that if the field = a
specific name, then make a X in the box. I have 4 of these on the document
each for a different caqtalogue.
When I run the merge, it pops up an error message Invalid Merge Field: This
merge field is used in the main document, but it does not exist in the
datasourse. I have options to remove the field, or replace with a field from
a drop down which only give AutoMergeFields and then OK or cancel.
If I click on the cancel continuously, the merge comes up and the if
statement did what it was suppose to do.
Problem is if I have a 100 documents to send, I have to click 12 times per
document, equating to a 1200 click. Time consuming.
Any ideas please

Regards,

Bruce Kidd


  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Word if...then statement using merge field = invalid Merge fie

1. if you can go into Edit Recipient List on the Mailings tab and
a. see what filename is in the Data Source box at the bottom left
b. see what column names are at the top of the list.

2. Can you show us exactly what you are putting in your IF field? (Also,
are all the field brace pairs the sort you enter using ctrl-F9, not the
ones you can type on the keyboard.)

3. Can you verify that these fields appear to work without problems if
you put them directly inside your document rather than nested inside an IF ?

Peter Jamieson

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

Bruce wrote:
This happens on my system in Word 2007 and at my customer in Word 2003. Not
sure what the data source is?? Pegasus OII is written in Visual Foxpro 9 if
that is what you are looking for.
It should not work, but once I clicked on the cancel button - 3x for each
merge field in the if statements - it is correct. As soon as I take the If
statement out, the document has no problem.

Thanks for responding, I have been struggeling with this for weeks.


Bruce Kidd



"Peter Jamieson" wrote:

Which version of Word is this? And do you know exactly what data source
the Word document is connecting to? (It sounds as if Pegasus may be
generating something then connecting the word document to it).

I am surprised that you are only seeing AutoMergeField names listed but
the merge still functions correctly with other field names.


Peter Jamieson

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

Bruce wrote:
Hi,

I am performing a mailmerge from within the Pegasus Opera II System. This
calls on Word for the mailmerge and you finish it off in there. In the
Pegasus software you set up custome fields. These are then available to
select when you set up the mail merge field. I have a field called Cat. It
could have4 predefined catalogues depending on selection.
In the merge document I used the if statement to say that if the field = a
specific name, then make a X in the box. I have 4 of these on the document
each for a different caqtalogue.
When I run the merge, it pops up an error message Invalid Merge Field: This
merge field is used in the main document, but it does not exist in the
datasourse. I have options to remove the field, or replace with a field from
a drop down which only give AutoMergeFields and then OK or cancel.
If I click on the cancel continuously, the merge comes up and the if
statement did what it was suppose to do.
Problem is if I have a 100 documents to send, I have to click 12 times per
document, equating to a 1200 click. Time consuming.
Any ideas please

Regards,

Bruce Kidd

  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Bruce Bruce is offline
external usenet poster
 
Posts: 54
Default Word if...then statement using merge field = invalid Merge fie

1. a. The file name here is C:\WINDOWS\TEMP\_2QZ0L1D44.DOC
b. The 4 merge fields that I am looking for each has a column in here.

2. This is the if statement. I am using the CTL F9 for the brackets -
{IF{MERGEFIELD Cat1}="Motion Comps Handbook" "X" ""}.

3. The field in the merge Cat1 is the one I am having trouble with. If I
just use this field in the merge and not have it in an if statement it works
fine.

Where you look at the column heading there is no information or lines in,
just the headings.

Thanx










v

"Peter Jamieson" wrote:

1. if you can go into Edit Recipient List on the Mailings tab and
a. see what filename is in the Data Source box at the bottom left
b. see what column names are at the top of the list.

2. Can you show us exactly what you are putting in your IF field? (Also,
are all the field brace pairs the sort you enter using ctrl-F9, not the
ones you can type on the keyboard.)

3. Can you verify that these fields appear to work without problems if
you put them directly inside your document rather than nested inside an IF ?

Peter Jamieson

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

Bruce wrote:
This happens on my system in Word 2007 and at my customer in Word 2003. Not
sure what the data source is?? Pegasus OII is written in Visual Foxpro 9 if
that is what you are looking for.
It should not work, but once I clicked on the cancel button - 3x for each
merge field in the if statements - it is correct. As soon as I take the If
statement out, the document has no problem.

Thanks for responding, I have been struggeling with this for weeks.


Bruce Kidd



"Peter Jamieson" wrote:

Which version of Word is this? And do you know exactly what data source
the Word document is connecting to? (It sounds as if Pegasus may be
generating something then connecting the word document to it).

I am surprised that you are only seeing AutoMergeField names listed but
the merge still functions correctly with other field names.


Peter Jamieson

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

Bruce wrote:
Hi,

I am performing a mailmerge from within the Pegasus Opera II System. This
calls on Word for the mailmerge and you finish it off in there. In the
Pegasus software you set up custome fields. These are then available to
select when you set up the mail merge field. I have a field called Cat. It
could have4 predefined catalogues depending on selection.
In the merge document I used the if statement to say that if the field = a
specific name, then make a X in the box. I have 4 of these on the document
each for a different caqtalogue.
When I run the merge, it pops up an error message Invalid Merge Field: This
merge field is used in the main document, but it does not exist in the
datasourse. I have options to remove the field, or replace with a field from
a drop down which only give AutoMergeFields and then OK or cancel.
If I click on the cancel continuously, the merge comes up and the if
statement did what it was suppose to do.
Problem is if I have a 100 documents to send, I have to click 12 times per
document, equating to a 1200 click. Time consuming.
Any ideas please

Regards,

Bruce Kidd




  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Word if...then statement using merge field = invalid Merge fie

Hi Bruce,

At the very least, you need a space after the '='. Other than that, the field code looks OK.

In your first post, you said "If I click on the cancel continuously, the merge comes up and the if statement did what it was suppose
to do". As posted, though, the IF test couldn't work correctly. The only reason I can see that you would get an 'Invalid Merge
Field' message is that the mergefield was mis-named (eg Cat1 instead of Cat_1).

--
Cheers
macropod
[Microsoft MVP - Word]


"Bruce" wrote in message ...
1. a. The file name here is C:\WINDOWS\TEMP\_2QZ0L1D44.DOC
b. The 4 merge fields that I am looking for each has a column in here.

2. This is the if statement. I am using the CTL F9 for the brackets -
{IF{MERGEFIELD Cat1}="Motion Comps Handbook" "X" ""}.

3. The field in the merge Cat1 is the one I am having trouble with. If I
just use this field in the merge and not have it in an if statement it works
fine.

Where you look at the column heading there is no information or lines in,
just the headings.

Thanx










v

"Peter Jamieson" wrote:

1. if you can go into Edit Recipient List on the Mailings tab and
a. see what filename is in the Data Source box at the bottom left
b. see what column names are at the top of the list.

2. Can you show us exactly what you are putting in your IF field? (Also,
are all the field brace pairs the sort you enter using ctrl-F9, not the
ones you can type on the keyboard.)

3. Can you verify that these fields appear to work without problems if
you put them directly inside your document rather than nested inside an IF ?

Peter Jamieson

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

Bruce wrote:
This happens on my system in Word 2007 and at my customer in Word 2003. Not
sure what the data source is?? Pegasus OII is written in Visual Foxpro 9 if
that is what you are looking for.
It should not work, but once I clicked on the cancel button - 3x for each
merge field in the if statements - it is correct. As soon as I take the If
statement out, the document has no problem.

Thanks for responding, I have been struggeling with this for weeks.


Bruce Kidd



"Peter Jamieson" wrote:

Which version of Word is this? And do you know exactly what data source
the Word document is connecting to? (It sounds as if Pegasus may be
generating something then connecting the word document to it).

I am surprised that you are only seeing AutoMergeField names listed but
the merge still functions correctly with other field names.


Peter Jamieson

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

Bruce wrote:
Hi,

I am performing a mailmerge from within the Pegasus Opera II System. This
calls on Word for the mailmerge and you finish it off in there. In the
Pegasus software you set up custome fields. These are then available to
select when you set up the mail merge field. I have a field called Cat. It
could have4 predefined catalogues depending on selection.
In the merge document I used the if statement to say that if the field = a
specific name, then make a X in the box. I have 4 of these on the document
each for a different caqtalogue.
When I run the merge, it pops up an error message Invalid Merge Field: This
merge field is used in the main document, but it does not exist in the
datasourse. I have options to remove the field, or replace with a field from
a drop down which only give AutoMergeFields and then OK or cancel.
If I click on the cancel continuously, the merge comes up and the if
statement did what it was suppose to do.
Problem is if I have a 100 documents to send, I have to click 12 times per
document, equating to a 1200 click. Time consuming.
Any ideas please

Regards,

Bruce Kidd



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
Invalid Merge Field error John Mailmerge 6 January 27th 09 09:36 PM
Invalid merge field newschapmj1 Mailmerge 2 February 19th 08 09:47 AM
Word: IF statement to merge a field only if another Field is popul HelenC Mailmerge 3 August 24th 06 10:33 AM
how to suppress Invalid Merge Field prompt Francisc Molnar Mailmerge 1 April 4th 06 09:44 AM
suppress invalid merge field word 2003 Mike Mailmerge 3 December 9th 04 11:13 AM


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