Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print only part of a merged field 2

Status
Not open for further replies.

Cozmo2

Technical User
Apr 7, 2006
87
US
In the mail merge feature in Word 2010 how would I print a portion of a field? I have a mergefield called 'termint' with a value of YYYYMM. I want to print only the YYYY portion.
Thanks in advance for any help you can give!
 



Can't. The Merge Field is an entity. Uneditable.

Whee is the SOURCE table?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 


Is it a TEXT file, an Access DB, an Excel, a Word Table????

WHAT?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 


Add a column to your SQL Server table for that truncated value or run a query that returns a column for that truncated value, for your mail merge.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Thanks, I'll put the wheels in motion to get this done.
Thanks.
 
You can do this without changing your data, using field coding:
{=INT({MERGEFIELD termint}/100) \# 0000}
or:
{=INT(«termint»/100) \# 0000}

Note: 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. Likewise, you can't type or copy & paste the chevrons (ie '« »') - they're part of the actual mergefields, which you can insert from the mailmerge toolbar.

Cheers
Paul Edstein
[MS MVP - Word]
 
Thanks Paul, it worked like a charm!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top