View Single Post
 
Old 11-02-2016, 03:58 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit 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

Quote:
Originally Posted by lmvantassel View Post
I am using MergeFields to pull information from a database into a Microsoft Word table. If there is nothing in the last field, it still inserts the comma - with nothing after.
Assuming each line is terminated by a paragraph break, you could use Find/Replace, with:
Find = ,^p
Replace = ^p

Better still, since this is for a mailmerge, you should consider using the mergefield \b switch in the last mergefield in the mailmerge main document and omitting the preceding comma. For example:
{MERGEFIELD Item \b ", "}
where 'Item' is the mergefield name.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote