Reply
 
Thread Tools Display Modes
  #1   Report Post  
Todd
 
Posts: n/a
Default How do you suppress a line in word if merge fld is blank?

Hi,

I have an excel spreadsheet as my datasource. I am pulling in merge fields
into my word document. I have a merge field called Company and sometimes
that field is empty depending on what record I am looking at. If the field
is empty, Word shows a blank line. Is there any way to suppress the blank
line if the Company field has no data in it? I have tried many examples to
no success including using the paragraph marker.

Just an fyi, I'm not using the traditional Word mail merge from the tools
menu. What I have is an excel datasource, twenty Word letters all setup in a
unique layout with merge fields embedded in them and I also have a main mail
merge word document that uses if conditions based on a letter code (in the
datasource) to determine which particular letter to show. In the main merge
doc I can then left or right arrow to see the next record with the
appropriate letter shown.

Microsoft support has told me since I am using embedded documents there is
currently no way (other than using there automated mail merge--which I can't
use as I have 20 unique letter styles) to suppress blank lines. I find this
hard to believe as I have embedded other complex if conditions around some
merge fields and they work fine when displayed. I just can't get suppress to
work.

Any ideas would be greatly appreciated as I am at a loss right now.

Thanks,
T
  #2   Report Post  
Peter Jamieson
 
Posts: n/a
Default

Microsoft support has told me since I am using embedded documents there is
currently no way (other than using there automated mail merge--which I
can't
use as I have 20 unique letter styles) to suppress blank lines.


What they probably mean is that the built-in facility for suppressing blank
lines does not work in Word 2003 (and maybe 2002) when the fields are nested
inside another field - which they will be in the case you mention, assuming
you are using an INCLUDETEXT or AUTOTEXT type field to do the different
letters.

In this case, what you have to do is embed the paragraph mark in the result
of an IF field. For example,

{ IF "{ MERGEFIELD Company }" = ""
"" "
{ MERGEFIELD Company }" }

(i.e. there needs to be a paragraph mark after

"" "

)

Peter jamieson
"Todd" wrote in message
...
Hi,

I have an excel spreadsheet as my datasource. I am pulling in merge
fields
into my word document. I have a merge field called Company and sometimes
that field is empty depending on what record I am looking at. If the
field
is empty, Word shows a blank line. Is there any way to suppress the blank
line if the Company field has no data in it? I have tried many examples
to
no success including using the paragraph marker.

Just an fyi, I'm not using the traditional Word mail merge from the tools
menu. What I have is an excel datasource, twenty Word letters all setup
in a
unique layout with merge fields embedded in them and I also have a main
mail
merge word document that uses if conditions based on a letter code (in the
datasource) to determine which particular letter to show. In the main
merge
doc I can then left or right arrow to see the next record with the
appropriate letter shown.

Microsoft support has told me since I am using embedded documents there is
currently no way (other than using there automated mail merge--which I
can't
use as I have 20 unique letter styles) to suppress blank lines. I find
this
hard to believe as I have embedded other complex if conditions around some
merge fields and they work fine when displayed. I just can't get suppress
to
work.

Any ideas would be greatly appreciated as I am at a loss right now.

Thanks,
T



  #3   Report Post  
Todd
 
Posts: n/a
Default

Thanks Peter, I believe I have tried this but I can give it a shot again.
Could you please send me an example exactly how it should be written (it
appears there was a carriage return in you previous example)? BTW, I am
using INCLUDETEXT based on what letter code comes back.

Thanks,
Todd

"Peter Jamieson" wrote:

Microsoft support has told me since I am using embedded documents there is
currently no way (other than using there automated mail merge--which I
can't
use as I have 20 unique letter styles) to suppress blank lines.


What they probably mean is that the built-in facility for suppressing blank
lines does not work in Word 2003 (and maybe 2002) when the fields are nested
inside another field - which they will be in the case you mention, assuming
you are using an INCLUDETEXT or AUTOTEXT type field to do the different
letters.

In this case, what you have to do is embed the paragraph mark in the result
of an IF field. For example,

{ IF "{ MERGEFIELD Company }" = ""
"" "
{ MERGEFIELD Company }" }

(i.e. there needs to be a paragraph mark after

"" "

)

Peter jamieson
"Todd" wrote in message
...
Hi,

I have an excel spreadsheet as my datasource. I am pulling in merge
fields
into my word document. I have a merge field called Company and sometimes
that field is empty depending on what record I am looking at. If the
field
is empty, Word shows a blank line. Is there any way to suppress the blank
line if the Company field has no data in it? I have tried many examples
to
no success including using the paragraph marker.

Just an fyi, I'm not using the traditional Word mail merge from the tools
menu. What I have is an excel datasource, twenty Word letters all setup
in a
unique layout with merge fields embedded in them and I also have a main
mail
merge word document that uses if conditions based on a letter code (in the
datasource) to determine which particular letter to show. In the main
merge
doc I can then left or right arrow to see the next record with the
appropriate letter shown.

Microsoft support has told me since I am using embedded documents there is
currently no way (other than using there automated mail merge--which I
can't
use as I have 20 unique letter styles) to suppress blank lines. I find
this
hard to believe as I have embedded other complex if conditions around some
merge fields and they work fine when displayed. I just can't get suppress
to
work.

Any ideas would be greatly appreciated as I am at a loss right now.

Thanks,
T




  #4   Report Post  
Todd
 
Posts: n/a
Default

Hi again,

Is this specificially what I need to enter? If so, it doesn't seem to be
working.


{If {MERGEFIELD Company \*MERGEFORMAT} = "" "" "¶ {MERGEFIELD Company
\*MERGEFORMAT}}

Thanks,
Todd

"Todd" wrote:

Thanks Peter, I believe I have tried this but I can give it a shot again.
Could you please send me an example exactly how it should be written (it
appears there was a carriage return in you previous example)? BTW, I am
using INCLUDETEXT based on what letter code comes back.

Thanks,
Todd

"Peter Jamieson" wrote:

Microsoft support has told me since I am using embedded documents there is
currently no way (other than using there automated mail merge--which I
can't
use as I have 20 unique letter styles) to suppress blank lines.


What they probably mean is that the built-in facility for suppressing blank
lines does not work in Word 2003 (and maybe 2002) when the fields are nested
inside another field - which they will be in the case you mention, assuming
you are using an INCLUDETEXT or AUTOTEXT type field to do the different
letters.

In this case, what you have to do is embed the paragraph mark in the result
of an IF field. For example,

{ IF "{ MERGEFIELD Company }" = ""
"" "
{ MERGEFIELD Company }" }

(i.e. there needs to be a paragraph mark after

"" "

)

Peter jamieson
"Todd" wrote in message
...
Hi,

I have an excel spreadsheet as my datasource. I am pulling in merge
fields
into my word document. I have a merge field called Company and sometimes
that field is empty depending on what record I am looking at. If the
field
is empty, Word shows a blank line. Is there any way to suppress the blank
line if the Company field has no data in it? I have tried many examples
to
no success including using the paragraph marker.

Just an fyi, I'm not using the traditional Word mail merge from the tools
menu. What I have is an excel datasource, twenty Word letters all setup
in a
unique layout with merge fields embedded in them and I also have a main
mail
merge word document that uses if conditions based on a letter code (in the
datasource) to determine which particular letter to show. In the main
merge
doc I can then left or right arrow to see the next record with the
appropriate letter shown.

Microsoft support has told me since I am using embedded documents there is
currently no way (other than using there automated mail merge--which I
can't
use as I have 20 unique letter styles) to suppress blank lines. I find
this
hard to believe as I have embedded other complex if conditions around some
merge fields and they work fine when displayed. I just can't get suppress
to
work.

Any ideas would be greatly appreciated as I am at a loss right now.

Thanks,
T




  #5   Report Post  
Peter Jamieson
 
Posts: n/a
Default

The carriage returns were deliberate., but you don't need the first one
(before the "" " ). It is what you need to enter, as long as the paragraph
mark is a normal paragraph mark - i.e. do not insert the /symbol/ that looks
like a paragraph mark, just press the enter key after that opening " just as
you would at the end of an ordinary Word paragraph. Also, I would leave out
the first \*MergeFORMAT and I have a preference for enclosing the first
comparand in quotes if it might evaluate to an empty string.

The general idea is that you use something like

previous text{ IF "{ MERGEFIELD Company }" = ""
"" "
{ MERGEFIELD Company }" }
following text



"Todd" wrote in message
...
Hi again,

Is this specificially what I need to enter? If so, it doesn't seem to be
working.


{If {MERGEFIELD Company \*MERGEFORMAT} = "" "" "¶ {MERGEFIELD Company
\*MERGEFORMAT}}

Thanks,
Todd

"Todd" wrote:

Thanks Peter, I believe I have tried this but I can give it a shot again.
Could you please send me an example exactly how it should be written (it
appears there was a carriage return in you previous example)? BTW, I am
using INCLUDETEXT based on what letter code comes back.

Thanks,
Todd

"Peter Jamieson" wrote:

Microsoft support has told me since I am using embedded documents
there is
currently no way (other than using there automated mail merge--which
I
can't
use as I have 20 unique letter styles) to suppress blank lines.

What they probably mean is that the built-in facility for suppressing
blank
lines does not work in Word 2003 (and maybe 2002) when the fields are
nested
inside another field - which they will be in the case you mention,
assuming
you are using an INCLUDETEXT or AUTOTEXT type field to do the different
letters.

In this case, what you have to do is embed the paragraph mark in the
result
of an IF field. For example,

{ IF "{ MERGEFIELD Company }" = ""
"" "
{ MERGEFIELD Company }" }

(i.e. there needs to be a paragraph mark after

"" "

)

Peter jamieson
"Todd" wrote in message
...
Hi,

I have an excel spreadsheet as my datasource. I am pulling in merge
fields
into my word document. I have a merge field called Company and
sometimes
that field is empty depending on what record I am looking at. If the
field
is empty, Word shows a blank line. Is there any way to suppress the
blank
line if the Company field has no data in it? I have tried many
examples
to
no success including using the paragraph marker.

Just an fyi, I'm not using the traditional Word mail merge from the
tools
menu. What I have is an excel datasource, twenty Word letters all
setup
in a
unique layout with merge fields embedded in them and I also have a
main
mail
merge word document that uses if conditions based on a letter code
(in the
datasource) to determine which particular letter to show. In the
main
merge
doc I can then left or right arrow to see the next record with the
appropriate letter shown.

Microsoft support has told me since I am using embedded documents
there is
currently no way (other than using there automated mail merge--which
I
can't
use as I have 20 unique letter styles) to suppress blank lines. I
find
this
hard to believe as I have embedded other complex if conditions around
some
merge fields and they work fine when displayed. I just can't get
suppress
to
work.

Any ideas would be greatly appreciated as I am at a loss right now.

Thanks,
T







  #6   Report Post  
Todd
 
Posts: n/a
Default

Hi Peter,

That's for the help, I will give that a shot later tonight. On a related
note, if your suggestions work how would I combine two merge fields together?
I other than Company I have CoFname and CoLname together and if neither are
empty show them but if they are suppress the blank line. If one is empty the
other one will be too so I could just check one. Below is how they are in
the doc I have.

{CoFname} {CoLname}

I guess my thinking would be to combine these two fields in the if condition
into one, is there a way to do this?

Thanks Again,
Todd



"Peter Jamieson" wrote:

The carriage returns were deliberate., but you don't need the first one
(before the "" " ). It is what you need to enter, as long as the paragraph
mark is a normal paragraph mark - i.e. do not insert the /symbol/ that looks
like a paragraph mark, just press the enter key after that opening " just as
you would at the end of an ordinary Word paragraph. Also, I would leave out
the first \*MergeFORMAT and I have a preference for enclosing the first
comparand in quotes if it might evaluate to an empty string.

The general idea is that you use something like

previous text{ IF "{ MERGEFIELD Company }" = ""
"" "
{ MERGEFIELD Company }" }
following text



"Todd" wrote in message
...
Hi again,

Is this specificially what I need to enter? If so, it doesn't seem to be
working.


{If {MERGEFIELD Company \*MERGEFORMAT} = "" "" "¶ {MERGEFIELD Company
\*MERGEFORMAT}}

Thanks,
Todd

"Todd" wrote:

Thanks Peter, I believe I have tried this but I can give it a shot again.
Could you please send me an example exactly how it should be written (it
appears there was a carriage return in you previous example)? BTW, I am
using INCLUDETEXT based on what letter code comes back.

Thanks,
Todd

"Peter Jamieson" wrote:

Microsoft support has told me since I am using embedded documents
there is
currently no way (other than using there automated mail merge--which
I
can't
use as I have 20 unique letter styles) to suppress blank lines.

What they probably mean is that the built-in facility for suppressing
blank
lines does not work in Word 2003 (and maybe 2002) when the fields are
nested
inside another field - which they will be in the case you mention,
assuming
you are using an INCLUDETEXT or AUTOTEXT type field to do the different
letters.

In this case, what you have to do is embed the paragraph mark in the
result
of an IF field. For example,

{ IF "{ MERGEFIELD Company }" = ""
"" "
{ MERGEFIELD Company }" }

(i.e. there needs to be a paragraph mark after

"" "

)

Peter jamieson
"Todd" wrote in message
...
Hi,

I have an excel spreadsheet as my datasource. I am pulling in merge
fields
into my word document. I have a merge field called Company and
sometimes
that field is empty depending on what record I am looking at. If the
field
is empty, Word shows a blank line. Is there any way to suppress the
blank
line if the Company field has no data in it? I have tried many
examples
to
no success including using the paragraph marker.

Just an fyi, I'm not using the traditional Word mail merge from the
tools
menu. What I have is an excel datasource, twenty Word letters all
setup
in a
unique layout with merge fields embedded in them and I also have a
main
mail
merge word document that uses if conditions based on a letter code
(in the
datasource) to determine which particular letter to show. In the
main
merge
doc I can then left or right arrow to see the next record with the
appropriate letter shown.

Microsoft support has told me since I am using embedded documents
there is
currently no way (other than using there automated mail merge--which
I
can't
use as I have 20 unique letter styles) to suppress blank lines. I
find
this
hard to believe as I have embedded other complex if conditions around
some
merge fields and they work fine when displayed. I just can't get
suppress
to
work.

Any ideas would be greatly appreciated as I am at a loss right now.

Thanks,
T






  #7   Report Post  
Graham Mayor
 
Posts: n/a
Default

{IF {Mergefield CoFname} "" "
{Mergefield CoFname} {Mergefield CoLname}"}

--

Graham Mayor - Word MVP

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


Todd wrote:
Hi Peter,

That's for the help, I will give that a shot later tonight. On a
related note, if your suggestions work how would I combine two merge
fields together? I other than Company I have CoFname and CoLname
together and if neither are empty show them but if they are suppress
the blank line. If one is empty the other one will be too so I could
just check one. Below is how they are in the doc I have.

{CoFname} {CoLname}

I guess my thinking would be to combine these two fields in the if
condition into one, is there a way to do this?

Thanks Again,
Todd



"Peter Jamieson" wrote:

The carriage returns were deliberate., but you don't need the first
one (before the "" " ). It is what you need to enter, as long as the
paragraph mark is a normal paragraph mark - i.e. do not insert the
/symbol/ that looks like a paragraph mark, just press the enter key
after that opening " just as you would at the end of an ordinary
Word paragraph. Also, I would leave out the first \*MergeFORMAT and
I have a preference for enclosing the first comparand in quotes if
it might evaluate to an empty string.

The general idea is that you use something like

previous text{ IF "{ MERGEFIELD Company }" = ""
"" "
{ MERGEFIELD Company }" }
following text



"Todd" wrote in message
...
Hi again,

Is this specificially what I need to enter? If so, it doesn't seem
to be working.


{If {MERGEFIELD Company \*MERGEFORMAT} = "" "" "¶ {MERGEFIELD
Company \*MERGEFORMAT}}

Thanks,
Todd

"Todd" wrote:

Thanks Peter, I believe I have tried this but I can give it a shot
again. Could you please send me an example exactly how it should
be written (it appears there was a carriage return in you previous
example)? BTW, I am using INCLUDETEXT based on what letter code
comes back.

Thanks,
Todd

"Peter Jamieson" wrote:

Microsoft support has told me since I am using embedded documents
there is
currently no way (other than using there automated mail
merge--which I
can't
use as I have 20 unique letter styles) to suppress blank lines.

What they probably mean is that the built-in facility for
suppressing blank
lines does not work in Word 2003 (and maybe 2002) when the fields
are nested
inside another field - which they will be in the case you mention,
assuming
you are using an INCLUDETEXT or AUTOTEXT type field to do the
different letters.

In this case, what you have to do is embed the paragraph mark in
the result
of an IF field. For example,

{ IF "{ MERGEFIELD Company }" = ""
"" "
{ MERGEFIELD Company }" }

(i.e. there needs to be a paragraph mark after

"" "

)

Peter jamieson
"Todd" wrote in message
...
Hi,

I have an excel spreadsheet as my datasource. I am pulling in
merge fields
into my word document. I have a merge field called Company and
sometimes
that field is empty depending on what record I am looking at.
If the field
is empty, Word shows a blank line. Is there any way to suppress
the blank
line if the Company field has no data in it? I have tried many
examples
to
no success including using the paragraph marker.

Just an fyi, I'm not using the traditional Word mail merge from
the tools
menu. What I have is an excel datasource, twenty Word letters
all setup
in a
unique layout with merge fields embedded in them and I also have
a main
mail
merge word document that uses if conditions based on a letter
code (in the
datasource) to determine which particular letter to show. In the
main
merge
doc I can then left or right arrow to see the next record with
the appropriate letter shown.

Microsoft support has told me since I am using embedded documents
there is
currently no way (other than using there automated mail
merge--which I
can't
use as I have 20 unique letter styles) to suppress blank lines.
I find
this
hard to believe as I have embedded other complex if conditions
around some
merge fields and they work fine when displayed. I just can't get
suppress
to
work.

Any ideas would be greatly appreciated as I am at a loss right
now.

Thanks,
T



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
Macros - Keyboard Commands Janet Microsoft Word Help 6 April 11th 05 05:28 AM
In Word, how can I see all files (*.*) in "save as"? citizen53 New Users 8 April 4th 05 04:56 PM
creating forms Fluffypink Microsoft Word Help 4 March 9th 05 04:17 PM
Boiletplates from Word Perfect linda Microsoft Word Help 1 January 28th 05 05:37 PM
How to change merge forms from Word Perfect to Microsoft Word dollfindance Microsoft Word Help 2 December 30th 04 03:35 PM


All times are GMT +1. The time now is 11:20 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"