Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 12-16-2011, 08:18 AM
macropod's Avatar
macropod macropod is offline Mail Merge - Trailing Spaces Windows 7 64bit Mail Merge - Trailing Spaces Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

In that case, you can use a series of tests, coded like:
Code:
{QUOTE "{MERGEFIELD Part_One}{IF{MERGEFIELD Part_One} = "???????" "   "}{IF{MERGEFIELD Part_One} = "????????" "  "}{IF{MERGEFIELD Part_One} = "?????????" " "}{MERGEFIELD Part_Two}" \* CHARFORMAT}
where Part_One is the name of your variable-length mergefield and Part_Two is the name of your fixed-length mergefield. Basically, the IF tests (the parts coded like {IF{MERGEFIELD Part_One} = "?" " "}) evaluate the length of the Part_One field and, according to that length, pad it out to 10 characters. The above coding representations cover from 7 to 9 characters in the Part_One data.

Note that the field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy & paste them from this message.

Strictly speaking, the QUOTE field isn't necessary but, when used with the CHARFORMAT, means you need only apply your barcode font to the 'Q' in 'QUOTE' for the whole field to be barcoded. That'll make it easier to maintain later on.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge - Trailing Spaces From a beginner: Mail Merge using Windows Mail mhalpern705 Mail Merge 3 12-16-2011 04:58 AM
Mail Merge - Trailing Spaces New to mail merge help please Keith Mail Merge 2 11-03-2011 03:56 AM
Mail Merge - Trailing Spaces Comma style without trailing zeroes but with decimal part Scaffold Excel 3 10-22-2011 11:08 PM
Mail Merge - Trailing Spaces Saving INDV mail merges During the mail merge sedain121 Mail Merge 2 10-04-2011 07:52 PM
Mail Merge help aman Mail Merge 0 05-07-2010 03:38 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:53 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft