Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
MikeB[_2_] MikeB[_2_] is offline
external usenet poster
 
Posts: 40
Default Conditional inserts in label merge

I'm doing a label merge (asked a recent question here about it). Now
I'm wondering if it is possible to apply conditions to the merge
process.

For example, if I have a field for last and first names, then I'd like
to merge the first name field into the label, but if the first name is
blank, then I'd like to substitute it with the last name.

In this example, if I have the first name field, then the line might
read.

The game was won by Mike.

If I don't have the first name field and I substitute the last name
field, the line of text should read

The game was won by Black.

Is this possible?

Thanks!



  #2   Report Post  
Posted to microsoft.public.word.newusers
MikeB[_2_] MikeB[_2_] is offline
external usenet poster
 
Posts: 40
Default Conditional inserts in label merge

On Feb 9, 9:09*am, MikeB wrote:
I'm doing a label merge (asked a recent question here about it). Now
I'm wondering if it is possible to apply conditions to the merge
process.

For example, if I have a field for last and first names, then I'd like
to merge the first name field into the label, but if the first name is
blank, then I'd like to substitute it with the last name.

In this example, if I have the first name field, then the line might
read.

The game was won by Mike.

If I don't have the first name field and I substitute the last name
field, the line of text should read

The game was won by Black.

Is this possible?

Thanks!


Actually, let me expand on that a little more.

Can I also vary the text inserted into the label? For instance, if I
have a field for sender and receiver, then if the receiver field is
filled in, the text might read:

Proposed receiver: Mike Black

But if the sender field is filled in, the text in that area might
read:

Transmitted by Joe Gorilla.

So, is either or both of these things possible in label merge
operations?

Thanks!
  #3   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Conditional inserts in label merge

That would be fairly simple
The game was won by {IF {Mergefield FirstName} "" "{Mergefield
Firstname}" "{Mergefield Lastname}"}
Use the correct field names and enter all the bracket pairs with CTRL+F9
--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




"MikeB" wrote in message
...
On Feb 9, 9:09 am, MikeB wrote:
I'm doing a label merge (asked a recent question here about it). Now
I'm wondering if it is possible to apply conditions to the merge
process.

For example, if I have a field for last and first names, then I'd like
to merge the first name field into the label, but if the first name is
blank, then I'd like to substitute it with the last name.

In this example, if I have the first name field, then the line might
read.

The game was won by Mike.

If I don't have the first name field and I substitute the last name
field, the line of text should read

The game was won by Black.

Is this possible?

Thanks!


Actually, let me expand on that a little more.

Can I also vary the text inserted into the label? For instance, if I
have a field for sender and receiver, then if the receiver field is
filled in, the text might read:

Proposed receiver: Mike Black

But if the sender field is filled in, the text in that area might
read:

Transmitted by Joe Gorilla.

So, is either or both of these things possible in label merge
operations?

Thanks!


  #4   Report Post  
Posted to microsoft.public.word.newusers
MikeB[_2_] MikeB[_2_] is offline
external usenet poster
 
Posts: 40
Default Conditional inserts in label merge

On Feb 9, 9:27*am, "Graham Mayor" wrote:
That would be fairly simple
The game was won by {IF {Mergefield FirstName} "" "{Mergefield
Firstname}" *"{Mergefield Lastname}"}
Use the correct field names and enter all the bracket pairs with CTRL+F9
--

Graham Mayor - *Word MVP

My web sitewww.gmayor.com
Word MVP web sitehttp://word.mvps.org


"MikeB" wrote in message

...
On Feb 9, 9:09 am, MikeB wrote:



I'm doing a label merge (asked a recent question here about it). Now
I'm wondering if it is possible to apply conditions to the merge
process.


For example, if I have a field for last and first names, then I'd like
to merge the first name field into the label, but if the first name is
blank, then I'd like to substitute it with the last name.


In this example, if I have the first name field, then the line might
read.


The game was won by Mike.


If I don't have the first name field and I substitute the last name
field, the line of text should read


The game was won by Black.


Is this possible?


Thanks!


Actually, let me expand on that a little more.

Can I also vary the text inserted into the label? *For instance, if I
have a field for sender and receiver, then if the receiver field is
filled in, the text might read:

Proposed receiver: Mike Black

But if the sender field is filled in, the text *in that area might
read:

Transmitted by Joe Gorilla.

So, is either or both of these things possible in label merge
operations?

Thanks!


Graham, thank you for your quick response. Is this in the Help
somewhere? (Have I ever complained how hard I find it to get the right
help section in the new Help system in Office 2007?).

If I look at your example, then a stylized representation seems to be:

{IF {condition "{true_action}" "{false_action}"}

and then to identify "stuff" (for want of a better technical term), I
use the Mergefield identifier to name the data element in the merging
record? Sorry if I'm being vague or imprecise.

If there is a good reference for this could you please point me there?

Thanks.
  #5   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Conditional inserts in label merge


"MikeB" wrote in message
...

You could take a look at my web page -
http://www.gmayor.com/formatting_word_fields.htm . It should give you some
ideas.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Graham, thank you for your quick response. Is this in the Help
somewhere? (Have I ever complained how hard I find it to get the right
help section in the new Help system in Office 2007?).


If I look at your example, then a stylized representation seems to be:


{IF {condition "{true_action}" "{false_action}"}


and then to identify "stuff" (for want of a better technical term), I
use the Mergefield identifier to name the data element in the merging
record? Sorry if I'm being vague or imprecise.


If there is a good reference for this could you please point me there?


Thanks.






  #6   Report Post  
Posted to microsoft.public.word.newusers
MikeB[_2_] MikeB[_2_] is offline
external usenet poster
 
Posts: 40
Default Conditional inserts in label merge

On Feb 9, 10:00*am, "Graham Mayor" wrote:
"MikeB" wrote in message

...

You could take a look at my web page -http://www.gmayor.com/formatting_word_fields.htm. It should give you some
ideas.

--

Graham Mayor - *Word MVP

My web sitewww.gmayor.com
Word MVP web sitehttp://word.mvps.org


Graham, thank you for your quick response. Is this in the Help
somewhere? (Have I ever complained how hard I find it to get the right
help section in the new Help system in Office 2007?).
If I look at your example, then a stylized representation seems to be:
{IF {condition "{true_action}" *"{false_action}"}
and then to identify "stuff" (for want of a better technical term), I
use the Mergefield identifier to name the data element in the merging
record? *Sorry if I'm being vague or imprecise.
If there is a good reference for this could you please point me there?
Thanks.


Thanks.


Now I have a really weird problem. The field I want to insert is in a
table that is imbedded in a cell of a bigger table. (Background: I'm
creating these cards with specific information on them, so I'm doing a
mail merge into each card - rather a label merge)

The condition is in a cell that is on the bottom of the table, so when
I edit the field and all fie field codes are displayed, it pushed the
bits I'm working with o0ut of sight, so I can't easily figure out what
I'm doing since I'm typing blind. Is ther some way I can edit this
text somewhere and then copy/paste it into the field?
  #7   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Conditional inserts in label merge

Compile the field construction manually in a blank document then paste it
into the cell.

Given the description of your merge document, and to pre-empt your next
question, can I suggest you take a look at the tutorial 'macropod' has
prepared based on the Microsoft support link (below), with working field
codes and a sample Excel data source which you can also download from my
website http://www.gmayor.com/Zips/Catalogue%20Mailmerge.zip

How to use mail merge to create a list sorted by category -
http://support.microsoft.com/?kbid=294686

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"MikeB" wrote in message
...
On Feb 9, 10:00 am, "Graham Mayor" wrote:
"MikeB" wrote in message

...

You could take a look at my web
page -http://www.gmayor.com/formatting_word_fields.htm. It should give you
some
ideas.

--

Graham Mayor - Word MVP

My web sitewww.gmayor.com
Word MVP web sitehttp://word.mvps.org


Graham, thank you for your quick response. Is this in the Help
somewhere? (Have I ever complained how hard I find it to get the right
help section in the new Help system in Office 2007?).
If I look at your example, then a stylized representation seems to be:
{IF {condition "{true_action}" "{false_action}"}
and then to identify "stuff" (for want of a better technical term), I
use the Mergefield identifier to name the data element in the merging
record? Sorry if I'm being vague or imprecise.
If there is a good reference for this could you please point me there?
Thanks.


Thanks.


Now I have a really weird problem. The field I want to insert is in a
table that is imbedded in a cell of a bigger table. (Background: I'm
creating these cards with specific information on them, so I'm doing a
mail merge into each card - rather a label merge)

The condition is in a cell that is on the bottom of the table, so when
I edit the field and all fie field codes are displayed, it pushed the
bits I'm working with o0ut of sight, so I can't easily figure out what
I'm doing since I'm typing blind. Is ther some way I can edit this
text somewhere and then copy/paste it into the field?


  #8   Report Post  
Natalie Lanoville Natalie Lanoville is offline
Junior Member
 
Posts: 5
Default

Quote:
Originally Posted by Graham Mayor View Post
That would be fairly simple
The game was won by {IF {Mergefield FirstName} "" "{Mergefield
Firstname}" "{Mergefield Lastname}"}
Use the correct field names and enter all the bracket pairs with CTRL+F9
--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
I am so grateful for this thread! I tried the code above and couldn't get it to work, but it gave me enough info to go back and try the If... then... else Word Field dialog again, put in placeholders for the two possible results, and then go back and edit the field with the correct info. I think that what was missing for me from trying it for myself was using the [CTRL+F9] function to insert the field brackets.

At any rate, my question was pretty much exactly the same as the OP (inserting an email address if the address line is blank), and it works! Thanks a lot! Now I just have to make it work with my embedded version of Word in Raiser's Edge.
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
Conditional Formatting a Mail Merge Label Steve Microsoft Word Help 2 December 9th 08 10:58 AM
Where do I find the Pendaflex 43290 Tab Inserts Label? Michellek Mailmerge 1 January 15th 08 10:10 AM
Mail merge inserts blank page terridarlin Mailmerge 1 January 8th 08 09:08 PM
using conditional merge, how do I not merge blank records... sonia2080 Mailmerge 1 June 22nd 06 01:49 PM
create conditional data in label mail merge Corky Whiteboard Mailmerge 2 September 16th 05 06:02 AM


All times are GMT +1. The time now is 11:27 AM.

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"