A Microsoft Office (Excel, Word) forum. OfficeFrustration

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 » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Unwanted blanks in mail merge.



 
 
Thread Tools Display Modes
  #1  
Old November 21st, 2008, 05:31 PM posted to microsoft.public.word.mailmerge.fields
Bobbler
external usenet poster
 
Posts: 1
Default Unwanted blanks in mail merge.

I am using Word 2003 and doing a very simple mail merge. I am inserting three
fields (Title, First Name and Surname) with a blank between each. When a
record without either Title, or First Name is processed the blanks that I
inserted between the fields are retained, meaning that I end up with more
blanks than intended. OK, Word is printing exactly what I specified, but I
rather hoped it would recognise when a field was absent and drop the blank
accordingly. Any ideas, please?
--
Bobbler
  #2  
Old November 21st, 2008, 09:20 PM posted to microsoft.public.word.mailmerge.fields
macropod[_2_]
external usenet poster
 
Posts: 2,402
Default Unwanted blanks in mail merge.

Hi Bobbler,

I can't see how one could reasonably expect Word to know you wanted it to delete the gaps you inserted.

Nevertheless, to suppress the gap after a particular mergefield-
.. duplicate the mailmerge field associated with the gap to be suppressed (eg «MyData») so that you get:
«MyData»«MyData»;
.. select both fields and Press Ctrl-F9, you'll get:
{ «MyData»«MyData» };
.. fill in between the braces so that you end up with:
{IF«myData»= "" "" "«MyData»*"},
where the '*' is the character you want to suppress (eg space, tab, paragraph mark);
.. delete the existing paragraph mark or line-feed that's outside the mergefield;
.. position the cursor anywhere in this field and press F9 to update it;
.. run your mailmerge.

To supress a gap before the mergefield, simply use "*«MyData»" instead of "«MyData»*"


--
Cheers
macropod
[MVP - Microsoft Word]


"Bobbler" wrote in message ...
I am using Word 2003 and doing a very simple mail merge. I am inserting three
fields (Title, First Name and Surname) with a blank between each. When a
record without either Title, or First Name is processed the blanks that I
inserted between the fields are retained, meaning that I end up with more
blanks than intended. OK, Word is printing exactly what I specified, but I
rather hoped it would recognise when a field was absent and drop the blank
accordingly. Any ideas, please?
--
Bobbler


 




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


All times are GMT +1. The time now is 04:49 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.