QueryString property erratic in Word 2003

P

Peter W

I have prepared a document with a user form which
restricts the returned dates that are returned from a
DBISAM datasource. The SQL string is then passed to the
datasource using the command
ActiveDocument.MailMerge.DataSource.QueryString =
QString . The document ran fine in Word 2000 but we've
just upgraded to Word 2003 and I cant get the macro to
run properly. What's wrong? Any suggestions.

Peter W.
 
C

Cindy M -WordMVP-

Hi Peter,
I have prepared a document with a user form which
restricts the returned dates that are returned from a
DBISAM datasource. The SQL string is then passed to the
datasource using the command
ActiveDocument.MailMerge.DataSource.QueryString =
QString . The document ran fine in Word 2000 but we've
just upgraded to Word 2003 and I cant get the macro to
run properly. What's wrong?
Hard to say without seeing the macro code. you also don't
tell us what the data source is, how it's linked to the
mail merge document, or how it's "not working".

Based on the little you tell us (2000 vs. 2003), it might
have something to do with the different default data
connection method (OLE DB).

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Sep 30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:)
 
P

Peter Wilde

Hi Cindy,
You answered my original questions some weeks ago (do you
remember?)and after your suggestions I got my mail merge
document working well. In Word 2000 the data is obtained
via DBISAM ODBC (from *.dat files) using microsoft query.
It worked a treat! However when we upgraded to Word 2003
my mail merge document longer worked properly. Word 2003
obtains its data without using microsoft query. Is there
a way to get Word 2003 to function in the same way that
Word 2000 used to so well.
Thank you for any help you can offer me.
Peter Wilde
 
C

Cindy M -WordMVP-

Hi Peter,

I answer so many questions, every day, that it's rare for me
to remember a particular person :)

As I mentioned, Word 2003 uses OLE DB as the default
connection method. In order to force your macro to use ODBC,
you'll need to include the SubType argument.

My recommendation: record a macro in Word 2003 to see how
that OpenDataSource code differs from what you have,
currently. In order to be able to choose ODBC, you need to
activate "Confirm conversions on open" in
Tools/Options/General. Note that versions of Word before
2002 will NOT support the SubType argument, and the code
won't compile properly if the library of an earlier version
is reference. Basically, you will need two different
versions of your solution.
You answered my original questions some weeks ago (do you
remember?)and after your suggestions I got my mail merge
document working well. In Word 2000 the data is obtained
via DBISAM ODBC (from *.dat files) using microsoft query.
It worked a treat! However when we upgraded to Word 2003
my mail merge document longer worked properly. Word 2003
obtains its data without using microsoft query. Is there
a way to get Word 2003 to function in the same way that
Word 2000 used to so well.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:)
 

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