A Microsoft Word forum. Microsoft Office Word Forum - WordBanter

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 » Microsoft Office Word Forum - WordBanter forum » Microsoft Word Newsgroups » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

dynamically formatting text color in mail merge



 
 
Thread Tools Display Modes
  #1  
Old June 12th 08, 04:05 AM posted to microsoft.public.word.mailmerge.fields
xray
external usenet poster
 
Posts: 2
Default dynamically formatting text color in mail merge

Hi,

I want to create labels but I want the text color to change based on data in
the excel spreadsheet.

For instance, I have a row of data with a column that contains a color such
as "blue" or "red" and I want the label text color to be that color. Is
there a way to do this using MS Word (office 2003)?

Example: 4 text fields will print but I want them printed in a color listed
in the data. I have a field named "color" so could I do something like:

fontcolor = color
titlefirstnamelastnamesuffix
fontcolor = "black"
print rest of fields.

(yeah I know it's not proper code but you get the picture

Thanks in advance!
Ads
  #2  
Old June 12th 08, 06:14 AM posted to microsoft.public.word.mailmerge.fields
Graham Mayor
external usenet poster
 
Posts: 19,312
Default dynamically formatting text color in mail merge

If you want (say) titlefirstnamelastnamesuffix formatted in
a colour, then toggle the fields
(ALT+F9) to display
{Mergefield title}{Mergefield firstname} {Mergefield lastname}{Mergefield
suffix}
add a Charformat switch to each eg
{Mergefield title \*Charformat}{Mergefield firstname \*Charformat}
{Mergefield lastname \*Charformat}{Mergefield suffix \*Charformat} and
format the fields in the colour you require.
You will not be able to format the same fields in different colours
according to the dictates of the individual record formatting in Excel.

--

Graham Mayor - Word MVP

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



xray wrote:
Hi,

I want to create labels but I want the text color to change based on
data in the excel spreadsheet.

For instance, I have a row of data with a column that contains a
color such as "blue" or "red" and I want the label text color to be
that color. Is there a way to do this using MS Word (office 2003)?

Example: 4 text fields will print but I want them printed in a color
listed in the data. I have a field named "color" so could I do
something like:

fontcolor = color
titlefirstnamelastnamesuffix
fontcolor = "black"
print rest of fields.

(yeah I know it's not proper code but you get the picture

Thanks in advance!



  #3  
Old June 12th 08, 08:27 PM posted to microsoft.public.word.mailmerge.fields
xray
external usenet poster
 
Posts: 2
Default dynamically formatting text color in mail merge

Well, thanks anyway, but that won't help. I could easily highlight the
fields with a color and get the same result, but I need something more
dynamic.

I guess it can't be done.

Thanks again.

"Graham Mayor" wrote:

If you want (say) titlefirstnamelastnamesuffix formatted in
a colour, then toggle the fields
(ALT+F9) to display
{Mergefield title}{Mergefield firstname} {Mergefield lastname}{Mergefield
suffix}
add a Charformat switch to each eg
{Mergefield title \*Charformat}{Mergefield firstname \*Charformat}
{Mergefield lastname \*Charformat}{Mergefield suffix \*Charformat} and
format the fields in the colour you require.
You will not be able to format the same fields in different colours
according to the dictates of the individual record formatting in Excel.


  #4  
Old July 11th 14, 09:02 PM
Jazzman19 Jazzman19 is offline
Junior Member
 
First recorded activity by WordBanter: Jul 2014
Posts: 1
Default

I have a workaround for this.
Use filtering in Excel to isolate the cells you want to color.
Add a column and enter a unique identifier for each color (ie. & for red and @ for green) in the appropriate row.
When creating your merge, add the identifier to the label or document (We will get rid of it later).
Use the "Find" feature in Word to locate all labels or documents that contain the identifier. Click "More", check the box marked "Use Wildcards", then use the replace feature to change the color of the font.
When you have completed all of the identifiers then your document or labels should have all the right colored fonts.
Use the "Find" feature again to find the identifiers. Click in the replace box and empty it, then click on "No formatting". Click OK and you will remove the identifiers, leaving the labels with the desired color.


Quote:
Originally Posted by xray View Post
Well, thanks anyway, but that won't help. I could easily highlight the
fields with a color and get the same result, but I need something more
dynamic.

I guess it can't be done.

Thanks again.

"Graham Mayor" wrote:

If you want (say) titlefirstnamelastnamesuffix formatted in
a colour, then toggle the fields
(ALT+F9) to display
{Mergefield title}{Mergefield firstname} {Mergefield lastname}{Mergefield
suffix}
add a Charformat switch to each eg
{Mergefield title \*Charformat}{Mergefield firstname \*Charformat}
{Mergefield lastname \*Charformat}{Mergefield suffix \*Charformat} and
format the fields in the colour you require.
You will not be able to format the same fields in different colours
according to the dictates of the individual record formatting in Excel.
 




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 On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word Mail-merge to email looses BG Color on Web-Based Mail Micmojav Mailmerge 4 September 18th 07 05:34 PM
how do I insert text dynamically Tim C. Mailmerge 1 December 27th 05 06:40 AM
Embed tables from Access dynamically into Word mail merge letters? Thomas Staudte Mailmerge 8 December 13th 05 05:35 AM
Grey Background Color Printing during Mail Merge Jessica Mailmerge 1 March 28th 05 05:29 PM
Switch an image dynamically based on mail merge field - possible? Chris Hlusak Mailmerge 1 January 24th 05 11:11 PM


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright 2004-2020 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.