Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Nabellfl Nabellfl is offline
external usenet poster
 
Posts: 11
Default Delete a table row when mergefield is blank??

I am using Word 2003. I have created a document which includes a table. In
each row I have placed my { mergefield }. When I merge the document, if
there is no data for a field then I need the table row to be deleted. Can I
use an {If, then, else} statement to accomplish this?

Any help is greatly appreciated.
  #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 Delete a table row when mergefield is blank??

That cannot be done using mail merge. Tell us exactly what you are trying
to do.

--
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

"NaBellFL" wrote in message
...
I am using Word 2003. I have created a document which includes a table.
In
each row I have placed my { mergefield }. When I merge the document, if
there is no data for a field then I need the table row to be deleted. Can
I
use an {If, then, else} statement to accomplish this?

Any help is greatly appreciated.



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Nabellfl Nabellfl is offline
external usenet poster
 
Posts: 11
Default Delete a table row when mergefield is blank??

I create a form letter. The information of the letter is in a table.
Example:
{mergefield matter_name}
Co. File No. {mergefield matsup_cofile }
Etc.

This document is then merged. If there is no data in the cofile field of my
database I want to automoatically delete that table row from the merged
document.

I recorded a simple macro and created a toolbar button for it that the user
can use to delete the row after the merge but I wanted to find out if there
is a way to "nest" this macro in an If statement or something else???

I hope that clarifies what I am trying to do.

"Doug Robbins - Word MVP" wrote:

That cannot be done using mail merge. Tell us exactly what you are trying
to do.

--
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

"NaBellFL" wrote in message
...
I am using Word 2003. I have created a document which includes a table.
In
each row I have placed my { mergefield }. When I merge the document, if
there is no data for a field then I need the table row to be deleted. Can
I
use an {If, then, else} statement to accomplish this?

Any help is greatly appreciated.




  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Delete a table row when mergefield is blank??

Hi NaBellFL,

You could achieve what you're after by placing the various mergefields on the same line with all except the first one embedded in IF
tests coded like:

{IF{MERGEFIELD matsup_cofile} "" "¶
{MERGEFIELD matsup_cofile}"}

where the '¶' is a proper paragraph mark or line-feed. That way, only the mergefields that have something in them will generate a
new line. No need for a macro.

Note: The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy & paste
them from this message.

--
Cheers
macropod
[MVP - Microsoft Word]


"NaBellFL" wrote in message ...
I create a form letter. The information of the letter is in a table.
Example:
{mergefield matter_name}
Co. File No. {mergefield matsup_cofile }
Etc.

This document is then merged. If there is no data in the cofile field of my
database I want to automoatically delete that table row from the merged
document.

I recorded a simple macro and created a toolbar button for it that the user
can use to delete the row after the merge but I wanted to find out if there
is a way to "nest" this macro in an If statement or something else???

I hope that clarifies what I am trying to do.

"Doug Robbins - Word MVP" wrote:

That cannot be done using mail merge. Tell us exactly what you are trying
to do.

--
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

"NaBellFL" wrote in message
...
I am using Word 2003. I have created a document which includes a table.
In
each row I have placed my { mergefield }. When I merge the document, if
there is no data for a field then I need the table row to be deleted. Can
I
use an {If, then, else} statement to accomplish this?

Any help is greatly appreciated.





  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Nabellfl Nabellfl is offline
external usenet poster
 
Posts: 11
Default Delete a table row when mergefield is blank??

Thanks for the response, I definitely learned something new. But, my table
rows are already established in my form letter (example below). I don't
believe I can use your IF statement or if I can I don't understand how. Any
other help would be greatly appreciated.

{mergefield matter_name}
Co. Claim No. {mergefield matsup_courtno}
Co. File No. {mergefield matsup_cofile}
Suit File No. {mergefield matsup_suitfile}
Unit No. {mergefield matsup_unitno}
Policy No. {mergefield matsup_policyno}
Insured {mergefield r_insured_1_fullemp}
Date of Incident {mergefield matsup_lossdate}
Our File No. {mergefield matter_matcode}

Dear {mergefield recipient_salutation}:

"macropod" wrote:

Hi NaBellFL,

You could achieve what you're after by placing the various mergefields on the same line with all except the first one embedded in IF
tests coded like:

{IF{MERGEFIELD matsup_cofile} "" "¶
{MERGEFIELD matsup_cofile}"}

where the '¶' is a proper paragraph mark or line-feed. That way, only the mergefields that have something in them will generate a
new line. No need for a macro.

Note: The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy & paste
them from this message.

--
Cheers
macropod
[MVP - Microsoft Word]


"NaBellFL" wrote in message ...
I create a form letter. The information of the letter is in a table.
Example:
{mergefield matter_name}
Co. File No. {mergefield matsup_cofile }
Etc.

This document is then merged. If there is no data in the cofile field of my
database I want to automoatically delete that table row from the merged
document.

I recorded a simple macro and created a toolbar button for it that the user
can use to delete the row after the merge but I wanted to find out if there
is a way to "nest" this macro in an If statement or something else???

I hope that clarifies what I am trying to do.

"Doug Robbins - Word MVP" wrote:

That cannot be done using mail merge. Tell us exactly what you are trying
to do.

--
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

"NaBellFL" wrote in message
...
I am using Word 2003. I have created a document which includes a table.
In
each row I have placed my { mergefield }. When I merge the document, if
there is no data for a field then I need the table row to be deleted. Can
I
use an {If, then, else} statement to accomplish this?

Any help is greatly appreciated.







  #6   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 Delete a table row when mergefield is blank??

While outside of a table (or within just one cell of a table) you can
prevent a blank line from occuring, as I said, you cannot get it to delete a
row from a table.

Do you have to use a table?

If you must use a table, you would need to use a "roll-your-own" equivalent
to mail merge using VBA.

--
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

"NaBellFL" wrote in message
...
Thanks for the response, I definitely learned something new. But, my
table
rows are already established in my form letter (example below). I don't
believe I can use your IF statement or if I can I don't understand how.
Any
other help would be greatly appreciated.

{mergefield matter_name}
Co. Claim No. {mergefield matsup_courtno}
Co. File No. {mergefield matsup_cofile}
Suit File No. {mergefield matsup_suitfile}
Unit No. {mergefield matsup_unitno}
Policy No. {mergefield matsup_policyno}
Insured {mergefield r_insured_1_fullemp}
Date of Incident {mergefield matsup_lossdate}
Our File No. {mergefield matter_matcode}

Dear {mergefield recipient_salutation}:

"macropod" wrote:

Hi NaBellFL,

You could achieve what you're after by placing the various mergefields on
the same line with all except the first one embedded in IF
tests coded like:

{IF{MERGEFIELD matsup_cofile} "" "¶
{MERGEFIELD matsup_cofile}"}

where the '¶' is a proper paragraph mark or line-feed. That way, only the
mergefields that have something in them will generate a
new line. No need for a macro.

Note: The field brace pairs (ie '{ }') for the above example are created
via Ctrl-F9 - you can't simply type them or copy & paste
them from this message.

--
Cheers
macropod
[MVP - Microsoft Word]


"NaBellFL" wrote in message
...
I create a form letter. The information of the letter is in a
table.
Example:
{mergefield matter_name}
Co. File No. {mergefield matsup_cofile }
Etc.

This document is then merged. If there is no data in the cofile field
of my
database I want to automoatically delete that table row from the merged
document.

I recorded a simple macro and created a toolbar button for it that the
user
can use to delete the row after the merge but I wanted to find out if
there
is a way to "nest" this macro in an If statement or something else???

I hope that clarifies what I am trying to do.

"Doug Robbins - Word MVP" wrote:

That cannot be done using mail merge. Tell us exactly what you are
trying
to do.

--
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

"NaBellFL" wrote in message
...
I am using Word 2003. I have created a document which includes a
table.
In
each row I have placed my { mergefield }. When I merge the
document, if
there is no data for a field then I need the table row to be
deleted. Can
I
use an {If, then, else} statement to accomplish this?

Any help is greatly appreciated.







  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Delete a table row when mergefield is blank??

Hi NaBellFL,

Whilst you can add/delete rows via mailmerge field coding, you can format the mailmerge paragraph borders, if you want, to simulate
a table. That may suffice for your needs.

--
Cheers
macropod
[MVP - Microsoft Word]


"NaBellFL" wrote in message ...
Thanks for the response, I definitely learned something new. But, my table
rows are already established in my form letter (example below). I don't
believe I can use your IF statement or if I can I don't understand how. Any
other help would be greatly appreciated.

{mergefield matter_name}
Co. Claim No. {mergefield matsup_courtno}
Co. File No. {mergefield matsup_cofile}
Suit File No. {mergefield matsup_suitfile}
Unit No. {mergefield matsup_unitno}
Policy No. {mergefield matsup_policyno}
Insured {mergefield r_insured_1_fullemp}
Date of Incident {mergefield matsup_lossdate}
Our File No. {mergefield matter_matcode}

Dear {mergefield recipient_salutation}:

"macropod" wrote:

Hi NaBellFL,

You could achieve what you're after by placing the various mergefields on the same line with all except the first one embedded in
IF
tests coded like:

{IF{MERGEFIELD matsup_cofile} "" "¶
{MERGEFIELD matsup_cofile}"}

where the '¶' is a proper paragraph mark or line-feed. That way, only the mergefields that have something in them will generate a
new line. No need for a macro.

Note: The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy & paste
them from this message.

--
Cheers
macropod
[MVP - Microsoft Word]


"NaBellFL" wrote in message ...
I create a form letter. The information of the letter is in a table.
Example:
{mergefield matter_name}
Co. File No. {mergefield matsup_cofile }
Etc.

This document is then merged. If there is no data in the cofile field of my
database I want to automoatically delete that table row from the merged
document.

I recorded a simple macro and created a toolbar button for it that the user
can use to delete the row after the merge but I wanted to find out if there
is a way to "nest" this macro in an If statement or something else???

I hope that clarifies what I am trying to do.

"Doug Robbins - Word MVP" wrote:

That cannot be done using mail merge. Tell us exactly what you are trying
to do.

--
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

"NaBellFL" wrote in message
...
I am using Word 2003. I have created a document which includes a table.
In
each row I have placed my { mergefield }. When I merge the document, if
there is no data for a field then I need the table row to be deleted. Can
I
use an {If, then, else} statement to accomplish this?

Any help is greatly appreciated.






  #8   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 Delete a table row when mergefield is blank??

I guess "can" was meant to be "cannot"

--
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

"macropod" wrote in message
...
Hi NaBellFL,

Whilst you can add/delete rows via mailmerge field coding, you can format
the mailmerge paragraph borders, if you want, to simulate a table. That
may suffice for your needs.

--
Cheers
macropod
[MVP - Microsoft Word]


"NaBellFL" wrote in message
...
Thanks for the response, I definitely learned something new. But, my
table
rows are already established in my form letter (example below). I don't
believe I can use your IF statement or if I can I don't understand how.
Any
other help would be greatly appreciated.

{mergefield matter_name}
Co. Claim No. {mergefield matsup_courtno}
Co. File No. {mergefield matsup_cofile}
Suit File No. {mergefield matsup_suitfile}
Unit No. {mergefield matsup_unitno}
Policy No. {mergefield matsup_policyno}
Insured {mergefield r_insured_1_fullemp}
Date of Incident {mergefield matsup_lossdate}
Our File No. {mergefield matter_matcode}

Dear {mergefield recipient_salutation}:

"macropod" wrote:

Hi NaBellFL,

You could achieve what you're after by placing the various mergefields
on the same line with all except the first one embedded in IF
tests coded like:

{IF{MERGEFIELD matsup_cofile} "" "¶
{MERGEFIELD matsup_cofile}"}

where the '¶' is a proper paragraph mark or line-feed. That way, only
the mergefields that have something in them will generate a
new line. No need for a macro.

Note: The field brace pairs (ie '{ }') for the above example are created
via Ctrl-F9 - you can't simply type them or copy & paste
them from this message.

--
Cheers
macropod
[MVP - Microsoft Word]


"NaBellFL" wrote in message
...
I create a form letter. The information of the letter is in a
table.
Example:
{mergefield matter_name}
Co. File No. {mergefield matsup_cofile }
Etc.

This document is then merged. If there is no data in the cofile field
of my
database I want to automoatically delete that table row from the
merged
document.

I recorded a simple macro and created a toolbar button for it that the
user
can use to delete the row after the merge but I wanted to find out if
there
is a way to "nest" this macro in an If statement or something else???

I hope that clarifies what I am trying to do.

"Doug Robbins - Word MVP" wrote:

That cannot be done using mail merge. Tell us exactly what you are
trying
to do.

--
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

"NaBellFL" wrote in message
...
I am using Word 2003. I have created a document which includes a
table.
In
each row I have placed my { mergefield }. When I merge the
document, if
there is no data for a field then I need the table row to be
deleted. Can
I
use an {If, then, else} statement to accomplish this?

Any help is greatly appreciated.








  #9   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Delete a table row when mergefield is blank??

Umm ... can't

--
Cheers
macropod
[MVP - Microsoft Word]


"Doug Robbins - Word MVP" wrote in message ...
I guess "can" was meant to be "cannot"

--
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

"macropod" wrote in message ...
Hi NaBellFL,

Whilst you can add/delete rows via mailmerge field coding, you can format the mailmerge paragraph borders, if you want, to
simulate a table. That may suffice for your needs.

--
Cheers
macropod
[MVP - Microsoft Word]


"NaBellFL" wrote in message ...
Thanks for the response, I definitely learned something new. But, my table
rows are already established in my form letter (example below). I don't
believe I can use your IF statement or if I can I don't understand how. Any
other help would be greatly appreciated.

{mergefield matter_name}
Co. Claim No. {mergefield matsup_courtno}
Co. File No. {mergefield matsup_cofile}
Suit File No. {mergefield matsup_suitfile}
Unit No. {mergefield matsup_unitno}
Policy No. {mergefield matsup_policyno}
Insured {mergefield r_insured_1_fullemp}
Date of Incident {mergefield matsup_lossdate}
Our File No. {mergefield matter_matcode}

Dear {mergefield recipient_salutation}:

"macropod" wrote:

Hi NaBellFL,

You could achieve what you're after by placing the various mergefields on the same line with all except the first one embedded
in IF
tests coded like:

{IF{MERGEFIELD matsup_cofile} "" "¶
{MERGEFIELD matsup_cofile}"}

where the '¶' is a proper paragraph mark or line-feed. That way, only the mergefields that have something in them will generate
a
new line. No need for a macro.

Note: The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy &
paste
them from this message.

--
Cheers
macropod
[MVP - Microsoft Word]


"NaBellFL" wrote in message ...
I create a form letter. The information of the letter is in a table.
Example:
{mergefield matter_name}
Co. File No. {mergefield matsup_cofile }
Etc.

This document is then merged. If there is no data in the cofile field of my
database I want to automoatically delete that table row from the merged
document.

I recorded a simple macro and created a toolbar button for it that the user
can use to delete the row after the merge but I wanted to find out if there
is a way to "nest" this macro in an If statement or something else???

I hope that clarifies what I am trying to do.

"Doug Robbins - Word MVP" wrote:

That cannot be done using mail merge. Tell us exactly what you are trying
to do.

--
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

"NaBellFL" wrote in message
...
I am using Word 2003. I have created a document which includes a table.
In
each row I have placed my { mergefield }. When I merge the document, if
there is no data for a field then I need the table row to be deleted. Can
I
use an {If, then, else} statement to accomplish this?

Any help is greatly appreciated.









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
If the mergefield is blank, delete the line. [email protected] Mailmerge 3 October 31st 06 06:09 AM
How to delete a blank page after a table at an end of a document? Dmitry Tables 6 April 26th 06 01:19 PM
How to delete a blank page after a table at an end of a document? Dmitry Formatting Long Documents 6 April 26th 06 01:19 PM
How to delete a blank page after a table at an end of a document? Dmitry Page Layout 6 April 26th 06 01:19 PM
how do I specify a blank mergefield in an if...then? GWys Mailmerge 1 October 4th 05 06:08 AM


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