> 1. Once you have set up the data source in the Word document, Word should
> not forget it (whatever it is) - in the case of an Excel document it should
[quoted text clipped - 109 lines]
>
> - Show quoted text -
> I have been using the advance filtering of Excel records for a while
> to select recipients for Work email merge. I have two questions.
> First, why doesn't Word remeber the source file? I have to reconnect
> every time.
Well, I don't know for sure, and there was definitely at least one problem
in WOrd 2002 that was fixed in Word 2003, but I believe what happens is
this:
a. when you connect to an Excel workbook in Word 2002 (XP) or later, Word
uses OLE DB by default
b. when it does that, it creates an OLE DB "Connection String" that
includes the full path name of the workbook
c. however, at some point it truncates that connection string to 255
characters (it isn't immediately, at least not in Word 2003, but it may do
so when it reopens the document
d. although it all worked the first time you opened the data source, when
Word next opens it, it tries to use the truncated string, which has either
truncated the path or is otherwise invalid, and the connection fails.
You can probably test that hypothesis fairly simply by putting the same
sheet in two folders, one with a very short name and the other deep inside a
hierarchy.
I had hoped that it might be possible to work around this problem by using a
.odc file to point to the Excel file, and either relying on Word to go via
the .odc each time you open the Word document, or paring down the length of
the Connection string as far as possible (because there's plenty of stuff
that doesn't need to be in it). However, even if you open via a .odc, once
you have opened the data source, the next time WOrd goes straight to that
data source - it doesn't open what the .odc tells it to open. Also, Word
always pads out the connection info. you provide with the default values of
all the OLE DB connection parameters for this driver.
Of course, I may be swrong about my hypothesis and there may also be other
things going on, but that's my best guess.
> Second, whensetting up advanced filters, I use two field
> with selection criteria of "not blank" joined by AND. Some times these
> criteria get duplicated, maybe when I save the Word file and the
> operator is changed to OR. Frustrating!
Yes, and again, it's an error in Word. All you can do is construct the query
string yourself and try to prevent Word from doing so if necessary.
Of course if you ever acquire a brand new copy of Word there's nothing to
stop you reporting these problems on a free technical incident, but MS
should know about these problems by now and it's really a question of
commercial choices as to what they do about them.
Peter Jamieson
Peter Jamieson
> On May 14, 10:29 am, "Peter Jamieson"
> <p...@KillmapSpjjnet.demon.co.uk> wrote:
[quoted text clipped - 148 lines]
> criteria get duplicated, maybe when I save the Word file and the
> operator is changed to OR. Frustrating!