Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Word > Mail Merge

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 05-05-2015, 12:07 PM
arkofcovenant arkofcovenant is offline Windows 7 64bit Office 2013
Novice
 
Join Date: May 2015
Posts: 1
arkofcovenant is on a distinguished road
Default Applying styles dynamically?

So, I'm trying to make cards for a board game using mail merge. I'm not sure if there's a way to do this with mail merge or just a way to do it post merge?



Basically, I have two merge fields on separate lines in the center of my card. I would like to apply a style (specifically, shade the background of the paragraph, including the 1st line) based on the text in the second field. For instance, for every card with the text "AAA" in the second field, I want to shade both the second field and the first field with red in the background, and for every card with "BBB" I would like both fields to be blue, etc. I would need it to be edge to edge of the text area. I was trying to do it post merge with find and replace, but I can't get it to "find" and select the first field along with the second, and thus cant get it to apply the color to the first field. In addition, even when I get it to select the second field only, it only applies to color to the right of the text, and leaves the left side white.

Has anyone tried and succeeded with anything similar? Any solutions?
Reply With Quote
  #2  
Old 05-08-2015, 06:02 AM
Charles Kenyon Charles Kenyon is offline Windows 8 Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 5,831
Charles Kenyon is a name known to allCharles Kenyon is a name known to allCharles Kenyon is a name known to allCharles Kenyon is a name known to allCharles Kenyon is a name known to allCharles Kenyon is a name known to all
Default

In your IF Field test for the presence of AAA. If present, have your truetext include your AAA field and the text you want. Make sure your IF field's truetext includes the paragraph mark. Format that truetext paragraph with your shading. Then have your falsetext be a separate paragraph with appropriate shading. Again, make sure the paragraph mark is within the falsetext quotation marks.
Reply With Quote
Reply

Tags
text style color dynamic

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamically create documents MrRikkie Word VBA 1 10-12-2012 09:15 AM
draw charts dynamically pouya7525 PowerPoint 0 09-06-2012 10:45 AM
Dynamically creating new drop down boxes. dmncs Word VBA 1 05-06-2012 09:29 PM
Does Word do this when applying Styles to a paragraph a second time? Bobosmite Word 2 04-17-2012 02:13 PM
Publisher 2000 - Applying multiple styles Jerb Publisher 0 02-15-2009 10:06 AM


All times are GMT -7. The time now is 11:31 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft