Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / July 2008

Tip: Looking for answers? Try searching our database.

Merge in Word w Excel Database

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SassyCat - 22 Jul 2008 22:17 GMT
Does anyone know how to get your merge form in Word to delete an unnecessary
line between paragraphs when it merges with an Excel database and only uses
one of two possible options in the merge process?  The document I have has
two possible options in a paragraph.  If it the first option is filled in and
not the second it leaves a blank line between the paragraphs.  The second
option is followed by a set of bulleted paragraph options that go with the
second option, therefore the extral line comes in when none of the bulleted
options are chosen.

Help please, thank you.
macropod - 22 Jul 2008 22:58 GMT
Hi SassyCat,

If you copy and paste your existing mailmerge field, which probably looks
something like:
«ExcelData»
so that you've got:
«ExcelData»«ExcelData»
then select both fields and Press Ctrl-F9, you'll get:
{ «ExcelData»«ExcelData» }
If you then fill in between the braces so that you've got:
{IF«ExcelData»= "" "" "«ExcelData»¶
"}
where the '¶' is a paragraph mark or line-feed, depending on which you're using, and delete the existing paragraph mark or line-feed
that's outside the mergefield, that should give the result you're after.

Signature

Cheers
macropod
[MVP - Microsoft Word]

> Does anyone know how to get your merge form in Word to delete an unnecessary
> line between paragraphs when it merges with an Excel database and only uses
[quoted text clipped - 6 lines]
>
> Help please, thank you.
SassyCat - 23 Jul 2008 16:21 GMT
This partially helps.  Here is what my merge fields look like.

«Option_A1»  «Option_A2»

•    «Option_B»
•    «Option_C»
•    «Option_D»
•    «Option_E»
•    «Option_F»

«Paragraph_G_or_H»

Can you be more specific.  I tried it and I get a couple different results.
But not what I exactly need.  If Option A1 is chosen and A2 trough F are not,
I get an extra line between the A1 paragraph and Paragraph G or H.  I presume
this is happening because of the extra lines between "Options A2 and B" and
"Option F and Paragraph G or H".

> Hi SassyCat,
>
[quoted text clipped - 21 lines]
> >
> > Help please, thank you.
macropod - 23 Jul 2008 23:04 GMT
Hi SassyCat,

Are you saying that, if Option_A1 has a value in it, then Options A2 through to Option F should be hidden and, conversely, Options
A2 through to Option F should all be displayed if Option_A1 is empty? If so, try coding the fields like:

{IF«Option_A1»= "" "«Option_A2»¶

• «Option_B»¶
• «Option_C»¶
• «Option_D»¶
• «Option_E»¶
• «Option_F»¶
" «Option_A1»}¶

«Paragraph_G_or_H»

Be careful to get the spacing and the double quotes right.

Alternatively if you need to toggle the paragraphs for options B-F, according to whether they have content, each of them should be
coded along the lines of:
{IF«Option_B»<> "" "«Option_B»¶
"}
or:
{IF«Option_B»= "" "" "«Option_B»¶
"}
Note that, if needed, you can add the same construction for options B-F to the first example, above. There will then only remain the
issue of what to do with the extra paragraph mark between «Option_A2» and «Paragraph_G_or_H» if «Option_A2» is used but all of
Options B-F are empty. If that's a possibility, you could insert a field coded as:
{IF(={IF«Option_B»= "" 0 1}+{IF«Option_C»= "" 0 1}+{IF«Option_D»= "" 0 1}+{IF«Option_E»= "" 0 1}+{IF«Option_F»= "" 0 1})> 0 "¶
"}
Thus:
{IF«Option_A1»= "" "«Option_A2»¶
{IF(={IF«Option_B»= "" 0 1}+{IF«Option_C»= "" 0 1}+{IF«Option_D»= "" 0 1}+{IF«Option_E»= "" 0 1}+{IF«Option_F»= "" 0 1})> 0 "¶
"}• «Option_B»¶
• «Option_C»¶
• «Option_D»¶
• «Option_E»¶
• «Option_F»¶
" «Option_A1»}¶

«Paragraph_G_or_H»

Signature

Cheers
macropod
[MVP - Microsoft Word]

> This partially helps.  Here is what my merge fields look like.
>
[quoted text clipped - 40 lines]
>> >
>> > Help please, thank you.
SassyCat - 24 Jul 2008 15:38 GMT
Thanks, this gives me enough information to set it up.  I appreciate the help.

> Hi SassyCat,
>
[quoted text clipped - 82 lines]
> >> >
> >> > Help please, thank you.
SassyCat - 24 Jul 2008 15:58 GMT
I though I had enough information, but there is one more scenario that might
happen.  They may choose both Option A1 and Option A2 as well as having only
some of the Options B-F chosen.  I need to incorporate both options A1 and A2
as a possibility and have it not put any extra lines in if one of the options
B-F is not chosen.

More help please.

> Hi SassyCat,
>
[quoted text clipped - 82 lines]
> >> >
> >> > Help please, thank you.
macropod - 25 Jul 2008 02:32 GMT
If you need to supress all of Options B-F if A2 is empty, then:

«Option_A1» {IF«Option_A2»<> "" "«Option_A2»¶

{IF«Option_B»<> "" "«Option_B»¶
"}{IF«Option_C»<> "" "«Option_C»¶
"}{IF«Option_D»<> "" "«Option_D»¶
"}{IF«Option_E»<> "" "«Option_E»¶
"}{IF«Option_F»<> "" "«Option_F»¶
"}}¶

«Paragraph_G_or_H»
with the B-F option paragraphs bulleted

Otherwise, if Options B-F are allowable even if Option A2 is empty, the simplest solution is to code each of them along the lines
of:
{IF«Option_B»<> "" "«Option_B»¶
"}

Signature

Cheers
macropod
[MVP - Microsoft Word]

>I though I had enough information, but there is one more scenario that might
> happen.  They may choose both Option A1 and Option A2 as well as having only
[quoted text clipped - 93 lines]
>> >> >
>> >> > Help please, thank you.
Doug Robbins - Word MVP - 22 Jul 2008 23:02 GMT
Use an { IF } field construction.  More information would be required to be
able to give you the complete construction that you would need.

Signature

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

> Does anyone know how to get your merge form in Word to delete an
> unnecessary
[quoted text clipped - 10 lines]
>
> Help please, thank you.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.