View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Cindy M -WordMVP-
 
Posts: n/a
Default How to have MS Word Prompt for ODBC or connection login and password

I have posted something similar to this elsewhere, but this is really
bugging me.

I have a mailmerge document that uses ODBC and MS query to connect to
oracle and complete a merge.

But when you reopen the mailmerge document, it never prompts you for a
connection login in and password.

Is there anyway to simply make MS word (before excuting the query)
prompt for the connection login and password.

(It seems to me, that this would be something that most people or users
would want, to have a secure data connection prompted before running
it)

Here is exactly what I do to create the mailmerge:

-ToolsLetters and MailingMail Merge Wizard
-Then select labels then select label options
-Then I select recipients and choose Browse then I select Tools MS
QUERY
-Then I select an ODBC connection (system DNS)
-Then a dialogue box appears 'MS ODBC connection for Oracle' then I
enter user name password and server.
-Then I enter my query and at this point I am MS query and have the
data returned to MS word.
-I finish the mail merge and save the document.

But now when anyone runs the document, they are not prompted for login
and password.
Is there anyway possible to have the login and password prompted when
they open this merge document?

The only possibility would be a macro. After you've made the connection
via MS Query, Word stores all the connection information within the
document. MS Query doesn't come into the equation any more; it only
serves as a tool for making the connection.

Record setting up such a connection in a macro and you should see the a
line containing OpenDataSource, and under that all the connection
information, including the login and password?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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 :-)