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 / April 2005

Tip: Looking for answers? Try searching our database.

Problems with Merge Codes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael Koerner - 07 Apr 2005 16:02 GMT
Using Word/Excel 2002 SP3

I have a Word File which merges Excel data just fine.

What I would like to do is modify the Word file to only accept the Excel data if
{MERGEFIELD active} is not blank.

The layout is a directory type Word table that has Name, Address, Telephone...
If the data source field "active" contains data, then enter the Name in Column
1, Address in Column 2 etc if the data source field "active" is blank, then skip
and go
to the next non blank record.

Any assistance would be greatly appreciated.

Signature

Regards
Michael Koerner

Peter Jamieson - 08 Apr 2005 10:29 GMT
Typically you should use the Mail Merge filtering options to select records
in the data source (in Word 2002/2003 open the Edit Recipients dialog box,
select one of the column headings, and choose "Advanced..." to get to the
relevant dialog box. In Word 2000 and earlier, use the Query Options button
in Mail Merge Helper).

However,
a. there are problems in some versions of Word where Word may lose the data
source if you specify filters.
b. maybe you meant something slightly different?

Peter Jamieson
> Using Word/Excel 2002 SP3
>
[quoted text clipped - 14 lines]
>
> Any assistance would be greatly appreciated.
Michael Koerner - 08 Apr 2005 15:02 GMT
Clicking on the "Mail Merge Recipients" button does not produce an "Advanced
Option" in my 2002 version of Word. Maybe I'm looking in the wrong place.

I thought it could be done using (which I know nothing about) an IF statement.
Something to the effect that:

{IF} {MERGEFIELD active} is = to "y" then enter the
{MERGEFIELD name} and the rest of the {MERGEFIELD's} for that particular record.

Signature

Regards
Michael Koerner

Typically you should use the Mail Merge filtering options to select records
in the data source (in Word 2002/2003 open the Edit Recipients dialog box,
select one of the column headings, and choose "Advanced..." to get to the
relevant dialog box. In Word 2000 and earlier, use the Query Options button
in Mail Merge Helper).

However,
a. there are problems in some versions of Word where Word may lose the data
source if you specify filters.
b. maybe you meant something slightly different?

Peter Jamieson
> Using Word/Excel 2002 SP3
>
[quoted text clipped - 14 lines]
>
> Any assistance would be greatly appreciated.
Peter Jamieson - 08 Apr 2005 15:42 GMT
When you open ail erge Recipients, you should see the data fro the data
source displayed with column headings. In each column heading there should
be a sall triangular drop-down arrow. If you click that, you should see
options to filter on various values in that particular column. So if you
click on the header of the Active column, you may be able to select the
filter you need. If not, at the bottom of the list you should see an
(Advanced...) option which leads to the dialog I mentioned.

> I thought it could be done using (which I know nothing about) an IF
> statement.
[quoted text clipped - 3 lines]
> {MERGEFIELD name} and the rest of the {MERGEFIELD's} for that particular
> record.

Yes, you could enclose your entire text inside the result of an IF field,
e.g.

{ IF "{ MERGEFIELD active } = "y" "the complete text of your document
including fields" "" }

but if you do that, you will get a blank page (i.e. not quite nothing) for
each record you are trying to exclude, if you are using a Letter erge. For a
Catalog/Directory Merge you should be OK. In either case, you may find that
complex foratting within the IF result does not behave properly.

You can also put the following at the start of your ail merge main document

{ SKIPIF "{ MERGEFIELD active } <> "y" }

but I would check that that does what you want, and be aware that Microsoft
advises against the use of SKIPIF (see Word Help) and that it may interact
badly with { NEXT } fields.

Peter Jamieson

> Clicking on the "Mail Merge Recipients" button does not produce an
> "Advanced
[quoted text clipped - 41 lines]
>>
>> Any assistance would be greatly appreciated.
Michael Koerner - 08 Apr 2005 18:15 GMT
Peter;

Much appreciated and thank you very much. The { SKIPIF "{ MERGEFIELD active } <>
"y" } worked
like a charm, as did the "Advanced Option" which I found to be much quicker.
Does that option stay once you leave the document? Or, is it something you have
to select each time you run the merge?

Signature

Regards
Michael Koerner

When you open ail erge Recipients, you should see the data fro the data
source displayed with column headings. In each column heading there should
be a sall triangular drop-down arrow. If you click that, you should see
options to filter on various values in that particular column. So if you
click on the header of the Active column, you may be able to select the
filter you need. If not, at the bottom of the list you should see an
(Advanced...) option which leads to the dialog I mentioned.

> I thought it could be done using (which I know nothing about) an IF
> statement.
[quoted text clipped - 3 lines]
> {MERGEFIELD name} and the rest of the {MERGEFIELD's} for that particular
> record.

Yes, you could enclose your entire text inside the result of an IF field,
e.g.

{ IF "{ MERGEFIELD active } = "y" "the complete text of your document
including fields" "" }

but if you do that, you will get a blank page (i.e. not quite nothing) for
each record you are trying to exclude, if you are using a Letter erge. For a
Catalog/Directory Merge you should be OK. In either case, you may find that
complex foratting within the IF result does not behave properly.

You can also put the following at the start of your ail merge main document

{ SKIPIF "{ MERGEFIELD active } <> "y" }

but I would check that that does what you want, and be aware that Microsoft
advises against the use of SKIPIF (see Word Help) and that it may interact
badly with { NEXT } fields.

Peter Jamieson

> Clicking on the "Mail Merge Recipients" button does not produce an
> "Advanced
[quoted text clipped - 43 lines]
>>
>> Any assistance would be greatly appreciated.
Peter Jamieson - 08 Apr 2005 18:25 GMT
The option /should/ stay, but in Word 2002 at least there were some errors
to do with sorts and filters whereby Word lost its connection altogether
when you saved, so
a. try it and see
b. if absolutely necessary and you are willing to do a bit of VBA, the
connection can probably be made with a suitable bit of VBA in an AutoOpen
macro.

Peter Jamieson
> Peter;
>
[quoted text clipped - 96 lines]
>>>
>>> Any assistance would be greatly appreciated.
Michael Koerner - 08 Apr 2005 18:47 GMT
What's VBA <g>

Signature

Regards
Michael Koerner

The option /should/ stay, but in Word 2002 at least there were some errors
to do with sorts and filters whereby Word lost its connection altogether
when you saved, so
a. try it and see
b. if absolutely necessary and you are willing to do a bit of VBA, the
connection can probably be made with a suitable bit of VBA in an AutoOpen
macro.

Peter Jamieson
> Peter;
>
[quoted text clipped - 80 lines]
>>>
>>> Any assistance would be greatly appreciated.
Peter Jamieson - 08 Apr 2005 19:00 GMT
I try to live without it too :-)

Over & out for now,

Peter Jamieson
> What's VBA <g>
>
[quoted text clipped - 98 lines]
>>>>
>>>> Any assistance would be greatly appreciated.

Rate this thread:






 
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.