Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
BruceAus BruceAus is offline
external usenet poster
 
Posts: 1
Default How can I apply conditional formating to a Word mergefield?

I would like to able to change the text colour in a mergefield based on the
returned value. For example, if the returned value is "A" I would like to
change the text colour to Yellow. Is this possible
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default How can I apply conditional formating to a Word mergefield?

One way to do simple formatting of this kind is to use an IF field to
insert the mergefield with one format or another, e.g. insert

{ IF "{ MERGEFIELD myfield }" = "A" "{ MERGEFIELD myfield }" "{
MERGEFIELD myfield }" }

then colour the second { MERGEFIELD myfield } (the one immediately after
the "A") yellow.

All the {} need to be the special field code braces that you can insert
using ctrl-F9.


Peter Jamieson

http://tips.pjmsn.me.uk

On 03/11/2009 00:19, BruceAus wrote:
I would like to able to change the text colour in a mergefield based on the
returned value. For example, if the returned value is "A" I would like to
change the text colour to Yellow. Is this possible

  #3   Report Post  
Steven Teslic Steven Teslic is offline
Junior Member
 
Posts: 1
Default

Hi Peter. This is essentially what I am having trouble with as well. I will have several seperate columns that will equal 1 or 0 depending on where a bottle needs to be shipped. Essentially, I will be wanting column F to appear highlighted in a specific colour based on columns I through L having a 1 or 0 entered in them. So I follwed the coding below e.g. If myfieldF =1 mergefield myfieldI blah blah. Which appeared to work. However, it did not work when I simple entered a space, and started the pattern over for the 5 other remaining colours I would need to designate statements for.

Is there anything special I need to do to string all of the commands together? or just enter a space and try repeating this pattern 5 more times?

Thanks,
Steve

Quote:
Originally Posted by Peter Jamieson View Post
One way to do simple formatting of this kind is to use an IF field to
insert the mergefield with one format or another, e.g. insert

{ IF "{ MERGEFIELD myfield }" = "A" "{ MERGEFIELD myfield }" "{
MERGEFIELD myfield }" }

then colour the second { MERGEFIELD myfield } (the one immediately after
the "A") yellow.

All the {} need to be the special field code braces that you can insert
using ctrl-F9.


Peter Jamieson

http://tips.pjmsn.me.uk

On 03/11/2009 00:19, BruceAus wrote:
I would like to able to change the text colour in a mergefield based on the
returned value. For example, if the returned value is "A" I would like to
change the text colour to Yellow. Is this possible
  #4   Report Post  
k11ngy k11ngy is offline
Junior Member
 
Posts: 2
Default

I seem to have problem, I managed to get code right I think but I just get the word RED and not the Age formatted to red, can anyone help?



Regards

Steve



Quote:
Originally Posted by Steven Teslic View Post
Hi Peter. This is essentially what I am having trouble with as well. I will have several seperate columns that will equal 1 or 0 depending on where a bottle needs to be shipped. Essentially, I will be wanting column F to appear highlighted in a specific colour based on columns I through L having a 1 or 0 entered in them. So I follwed the coding below e.g. If myfieldF =1 mergefield myfieldI blah blah. Which appeared to work. However, it did not work when I simple entered a space, and started the pattern over for the 5 other remaining colours I would need to designate statements for.

Is there anything special I need to do to string all of the commands together? or just enter a space and try repeating this pattern 5 more times?

Thanks,
Steve
Attached Images
 
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
Creating styles with conditional formating vojo Microsoft Word Help 2 January 28th 09 05:59 PM
Conditional Formating Daedalus1 Tables 1 December 5th 08 03:07 AM
Conditional Formating Lisa Mazzanti Microsoft Word Help 1 May 16th 08 06:22 PM
Mergefield conditional, need to skip blank line Julie B Mailmerge 2 March 27th 08 05:30 PM
Conditional Formating Manny Tables 2 May 28th 07 08:54 PM


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

Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Copyright 2004-2023 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"