View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Suppress a tab between fields when the fields are blank!

I suspect you need something like

{ IF "{ MERGEFIELD "MedOptLabel" }{ MERGEFIELD "Medical_Option" }" ""
"{ IF "{MERGEFIELD "MedOptLabel" }" "" "{ MERGEFIELD "MedOptLabel"
}^t{ IF "{ MERGEFIELD "Medical_Option" }" "" " {MERGEFIELD
"Medical_Option"}^p" }

where the ^t and ^p are actual tab and paragraph characters respectively.

(assuming you don't care about a trailing tab when Medical_Option is
blank but MedOptLabel is not)

Peter Jamieson

http://tips.pjmsn.me.uk

On 04/12/2009 18:07, Kim wrote:
I followed the instructions to suppress a line when the line is empty,
but my problem is I have two fields with a tab between them. How do I
suppress the tab so the paragraph line will be suppressed/hidden? Here
are my fields (MedOptLabeltab Medical Option):

{IF{MERGEFIELD "MedOptLabel" } "" "{MERGEFIELD "MedOptLabel" }^t{IF
{MERGEFIELD "Medical_Option"} "" " {MERGEFIELD "Medical_Option"}^p

Is there any way to bring the tab into the formula so it'll get
suppressed along with the paragraph mark? Any help would be
appreciated.

Kim