#1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Alex Alex is offline
external usenet poster
 
Posts: 2
Default blank fields

Hi

I have three fields - Title Forename and Surname.
If Title has data I need to mailmerge Title First Char of Forename and
Surname
If title is empty II need first Char of Forename and Surname
Can some kind person tell me the best or most correct syntax please

Thanks
A


  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default blank fields

There is no way extracting the first letter of the forename using mail merge
fields. The best way to do that would be to put the data source into Excel
and then you can use the Left() function to populate a column with the first
letter. While you are doing that there, you could also combine it with the
Title if there is one using the If() function in Excel.

That part of it can however be done using a field construction in Word as
follows:

{ IF { MERGEFIELD Title } "" "{ MERGEFIELD Title } { MERGEFIELD
Initial }" "{ MERGEFIELD Initial }" }

You must use Ctrl+F9 to insert the field delimiters { } and you use Alt+F9
to toggle off their display.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Alex" wrote in message
...
Hi

I have three fields - Title Forename and Surname.
If Title has data I need to mailmerge Title First Char of Forename and
Surname
If title is empty II need first Char of Forename and Surname
Can some kind person tell me the best or most correct syntax please

Thanks
A




  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default blank fields

You are going to need a fourth field - Initial - which can easily be derived
from the forename field in (say) Excel - but not with Word fields.
The syntax would then be
{IF {Mergefield Title} "" "{Mergefield Title} {Mergefield Initial}"
"{Mergefield Forename}"}

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Alex wrote:
Hi

I have three fields - Title Forename and Surname.
If Title has data I need to mailmerge Title First Char of Forename
and Surname
If title is empty II need first Char of Forename and Surname
Can some kind person tell me the best or most correct syntax please

Thanks
A



  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod macropod is offline
external usenet poster
 
Posts: 1,002
Default blank fields

Hi Alex,

You'll need to modify your data source to hold the initials as well as the
names. Then your mailmerge could use an IF test against the title to
determine whether to use the name or initials

Cheers

--
macropod
[MVP - Microsoft Word]


"Alex" wrote in message
...
Hi

I have three fields - Title Forename and Surname.
If Title has data I need to mailmerge Title First Char of Forename and
Surname
If title is empty II need first Char of Forename and Surname
Can some kind person tell me the best or most correct syntax please

Thanks
A




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Non Printing of blank fields Tony Williams Mailmerge 6 May 31st 06 07:50 PM
Problem with numeric blank fields Iaacov Rosenberg Mailmerge 4 May 25th 06 12:31 PM
suppress spaces left by blank mail merge fields k2swan Mailmerge 1 November 18th 05 09:41 PM
omit blank mail merge fields gapkid Mailmerge 2 October 20th 05 07:19 AM
Mailmerge:unwanted blank lines caused by empty data fields Mail merge - Empty data field Microsoft Word Help 0 October 5th 05 01:09 PM


All times are GMT +1. The time now is 01:14 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"