Bug in Mailmerge Filters?

S

SDS

I have a mail merge in WORD 2007 using Excel 2007 as a data source. I have
entered a filter that includes two lines that limit the rows to those between
two dates (e.g. DateX >= 10/1/2008 and DateX <= 10/31/2008). After saving the
filter, rows with blank dates appear. Re-opening the filter dialogue reveals
that a row has been added to the filters I entered that expands the filtering
to include "DateX is Blank". I removed this row and saved again -- and it
just gets added again.

Is this a known bug? Any work arounds?
 
M

macropod

Hi SDS,

You could probably achieve what you're after by adding two SKIPIF fields to your mailmerge main document, coded as:
{SKIPIF{DateX \@ YYYYMMDD}< 20081001}
and
{SKIPIF{DateX \@ YYYYMMDD}> 20081031}
respectively.

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

SDS

Thanks, Macropod for responding, though I am not sure you are addressing the
core issue:

How is it that I can create a filter with two rows, save it, and after
returning to the filter screen have three rows (one which I did not enter
["DateX is Blank"])? Saving again results in a 4th row, and so on. Where are
these extra rows coming from -- and how do I keep them from appearing in the
first place?

I've used mail merge filters before, and in other similar files using both
Word/Excel2007 without any issue -- including using two rows to limit based
on date. Nothing like this occurs in my other documents.

SDS
--
SDS


macropod said:
Hi SDS,

You could probably achieve what you're after by adding two SKIPIF fields to your mailmerge main document, coded as:
{SKIPIF{DateX \@ YYYYMMDD}< 20081001}
and
{SKIPIF{DateX \@ YYYYMMDD}> 20081031}
respectively.

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

--
Cheers
macropod
[MVP - Microsoft Word]


SDS said:
I have a mail merge in WORD 2007 using Excel 2007 as a data source. I have
entered a filter that includes two lines that limit the rows to those between
two dates (e.g. DateX >= 10/1/2008 and DateX <= 10/31/2008). After saving the
filter, rows with blank dates appear. Re-opening the filter dialogue reveals
that a row has been added to the filters I entered that expands the filtering
to include "DateX is Blank". I removed this row and saved again -- and it
just gets added again.

Is this a known bug? Any work arounds?
 
M

macropod

Hi SDS,

It may be that the mailmerge filter needs to be told what to do with missing dates (ie they aren't explicitly in or out of the date
range). Did you try changing the ["DateX is Blank"] filter to ["DateX is not Blank"]?

--
Cheers
macropod
[MVP - Microsoft Word]


SDS said:
Thanks, Macropod for responding, though I am not sure you are addressing the
core issue:

How is it that I can create a filter with two rows, save it, and after
returning to the filter screen have three rows (one which I did not enter
["DateX is Blank"])? Saving again results in a 4th row, and so on. Where are
these extra rows coming from -- and how do I keep them from appearing in the
first place?

I've used mail merge filters before, and in other similar files using both
Word/Excel2007 without any issue -- including using two rows to limit based
on date. Nothing like this occurs in my other documents.

SDS
--
SDS


macropod said:
Hi SDS,

You could probably achieve what you're after by adding two SKIPIF fields to your mailmerge main document, coded as:
{SKIPIF{DateX \@ YYYYMMDD}< 20081001}
and
{SKIPIF{DateX \@ YYYYMMDD}> 20081031}
respectively.

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

--
Cheers
macropod
[MVP - Microsoft Word]


SDS said:
I have a mail merge in WORD 2007 using Excel 2007 as a data source. I have
entered a filter that includes two lines that limit the rows to those between
two dates (e.g. DateX >= 10/1/2008 and DateX <= 10/31/2008). After saving the
filter, rows with blank dates appear. Re-opening the filter dialogue reveals
that a row has been added to the filters I entered that expands the filtering
to include "DateX is Blank". I removed this row and saved again -- and it
just gets added again.

Is this a known bug? Any work arounds?
 
P

Peter Jamieson

The only KB article I could find that really said something about the
cause of this problem (and perhaps this is a slightly different problem) is

http://support.microsoft.com/kb/286880/en-us

which suggests that the only way to avoid the problem is to avoid using
ODSO, which /probably/ means that you have to use the connection methods
that predate ODSO, e.g. DDE for Excel and Access. There are so many
logical possibilities in there (what uses ODSO? Is the query only parsed
when the Query options dialog box is displayed) that it would be
difficult to draw any further conclusions without a much closer look,
and perhaps knowledge of Word's source code, but that does correspond
roughly with what I remember about this.

As for "workarounds", I suspect that the key things are:
a. create the query you want in VBA code, probably using OpenDataSource
b. do not open the Query Options dialog

but I would not be too sure about that, either.

Peter Jamieson

http://tips.pjmsn.me.uk
 
S

SDS

I have several other mail merge documents in which I have not had to define
how to handle blank dates that have worked just fine.

Changing to 'DateX is not blank' results in the system adding additional
rows for both 'DateX is blank' and 'DateX is not blank'. This situation
starts to look like the KB article that Peter identified.

SDS
--
SDS


macropod said:
Hi SDS,

It may be that the mailmerge filter needs to be told what to do with missing dates (ie they aren't explicitly in or out of the date
range). Did you try changing the ["DateX is Blank"] filter to ["DateX is not Blank"]?

--
Cheers
macropod
[MVP - Microsoft Word]


SDS said:
Thanks, Macropod for responding, though I am not sure you are addressing the
core issue:

How is it that I can create a filter with two rows, save it, and after
returning to the filter screen have three rows (one which I did not enter
["DateX is Blank"])? Saving again results in a 4th row, and so on. Where are
these extra rows coming from -- and how do I keep them from appearing in the
first place?

I've used mail merge filters before, and in other similar files using both
Word/Excel2007 without any issue -- including using two rows to limit based
on date. Nothing like this occurs in my other documents.

SDS
--
SDS


macropod said:
Hi SDS,

You could probably achieve what you're after by adding two SKIPIF fields to your mailmerge main document, coded as:
{SKIPIF{DateX \@ YYYYMMDD}< 20081001}
and
{SKIPIF{DateX \@ YYYYMMDD}> 20081031}
respectively.

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

--
Cheers
macropod
[MVP - Microsoft Word]


I have a mail merge in WORD 2007 using Excel 2007 as a data source. I have
entered a filter that includes two lines that limit the rows to those between
two dates (e.g. DateX >= 10/1/2008 and DateX <= 10/31/2008). After saving the
filter, rows with blank dates appear. Re-opening the filter dialogue reveals
that a row has been added to the filters I entered that expands the filtering
to include "DateX is Blank". I removed this row and saved again -- and it
just gets added again.

Is this a known bug? Any work arounds?
 
S

SDS

Thanks, Peter, I had seen that articale as well. Since my original filter did
not include a line for either IsBlank or Not IsBlank, I'm not sure how the
first one appeared on its own!

SDS
 
M

macropod

Hi SDS,
This situation starts to look like the KB article that Peter identified.
If so, changing the connection type might solve the problem. If not, try deleting the filters and using the workaound I posted
originally.

--
Cheers
macropod
[MVP - Microsoft Word]


SDS said:
I have several other mail merge documents in which I have not had to define
how to handle blank dates that have worked just fine.

Changing to 'DateX is not blank' results in the system adding additional
rows for both 'DateX is blank' and 'DateX is not blank'. This situation
starts to look like the KB article that Peter identified.

SDS
--
SDS


macropod said:
Hi SDS,

It may be that the mailmerge filter needs to be told what to do with missing dates (ie they aren't explicitly in or out of the
date
range). Did you try changing the ["DateX is Blank"] filter to ["DateX is not Blank"]?

--
Cheers
macropod
[MVP - Microsoft Word]


SDS said:
Thanks, Macropod for responding, though I am not sure you are addressing the
core issue:

How is it that I can create a filter with two rows, save it, and after
returning to the filter screen have three rows (one which I did not enter
["DateX is Blank"])? Saving again results in a 4th row, and so on. Where are
these extra rows coming from -- and how do I keep them from appearing in the
first place?

I've used mail merge filters before, and in other similar files using both
Word/Excel2007 without any issue -- including using two rows to limit based
on date. Nothing like this occurs in my other documents.

SDS
--
SDS


:

Hi SDS,

You could probably achieve what you're after by adding two SKIPIF fields to your mailmerge main document, coded as:
{SKIPIF{DateX \@ YYYYMMDD}< 20081001}
and
{SKIPIF{DateX \@ YYYYMMDD}> 20081031}
respectively.

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

--
Cheers
macropod
[MVP - Microsoft Word]


I have a mail merge in WORD 2007 using Excel 2007 as a data source. I have
entered a filter that includes two lines that limit the rows to those between
two dates (e.g. DateX >= 10/1/2008 and DateX <= 10/31/2008). After saving the
filter, rows with blank dates appear. Re-opening the filter dialogue reveals
that a row has been added to the filters I entered that expands the filtering
to include "DateX is Blank". I removed this row and saved again -- and it
just gets added again.

Is this a known bug? Any work arounds?
 
M

macropod

Hi SDS,

FWIW, it's occurred to me that for your proble you could get away with just one SKIPF field in your mailmerge main document, coded
as:
{SKIPIF{MERGEFIELD DateX \@ YYYYMM}<> 200810}

Alternatively, you can leave the current filters in place and add a SKIPF field in your mailmerge main document, coded as:
{SKIPIF{MERGEFIELD DateX}= ""}
That way you can continue to use the filters in the way you're used to doing.

--
Cheers
macropod
[MVP - Microsoft Word]
PS: I omitted the 'MERGEFIELD' part of the expressions from my original post, sorry.


SDS said:
I have several other mail merge documents in which I have not had to define
how to handle blank dates that have worked just fine.

Changing to 'DateX is not blank' results in the system adding additional
rows for both 'DateX is blank' and 'DateX is not blank'. This situation
starts to look like the KB article that Peter identified.

SDS
--
SDS


macropod said:
Hi SDS,

It may be that the mailmerge filter needs to be told what to do with missing dates (ie they aren't explicitly in or out of the
date
range). Did you try changing the ["DateX is Blank"] filter to ["DateX is not Blank"]?

--
Cheers
macropod
[MVP - Microsoft Word]


SDS said:
Thanks, Macropod for responding, though I am not sure you are addressing the
core issue:

How is it that I can create a filter with two rows, save it, and after
returning to the filter screen have three rows (one which I did not enter
["DateX is Blank"])? Saving again results in a 4th row, and so on. Where are
these extra rows coming from -- and how do I keep them from appearing in the
first place?

I've used mail merge filters before, and in other similar files using both
Word/Excel2007 without any issue -- including using two rows to limit based
on date. Nothing like this occurs in my other documents.

SDS
--
SDS


:

Hi SDS,

You could probably achieve what you're after by adding two SKIPIF fields to your mailmerge main document, coded as:
{SKIPIF{DateX \@ YYYYMMDD}< 20081001}
and
{SKIPIF{DateX \@ YYYYMMDD}> 20081031}
respectively.

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

--
Cheers
macropod
[MVP - Microsoft Word]


I have a mail merge in WORD 2007 using Excel 2007 as a data source. I have
entered a filter that includes two lines that limit the rows to those between
two dates (e.g. DateX >= 10/1/2008 and DateX <= 10/31/2008). After saving the
filter, rows with blank dates appear. Re-opening the filter dialogue reveals
that a row has been added to the filters I entered that expands the filtering
to include "DateX is Blank". I removed this row and saved again -- and it
just gets added again.

Is this a known bug? Any work arounds?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top