View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Ronald Nissley
 
Posts: n/a
Default How to prompt for ODBC Connection in mail merge using MS query

On 7 Nov 2005 08:19:32 -0800
wrote:

Hello,

I have a MS Word mail merge document that runs OBDC using MS Query.

The problem is I do not want to have it automatically connect to the
datasource when the
word document is open.

I would like it to prompt for the odbc login ID and password before
running the connection.

Is this possible?

Thanks
Tom Horton


Tom,

I don't know about an OBDC login ID/Password, but if you set a database
password (I'm assuming you're using Access), you will be prompted to
supply the password when opening a mail merge document that uses OBDC
to connect to the database.
To set the database password, you will need to open the database in
'Exclusive' mode. Open Access and trigger the Open dialog (File -
Open). Navigate to the database you wish to password protect and select
it. On the Open button (to the far right), you should see a small,
down-pointing arrow. Press the arrow and choose Open Exclusive. When
the database is open, go the Tools - Security menu to set the database
password. There is an option to 'allow saving password' when you are
prompted for the password--leave that unchecked if you wish to be
prompted for a password each time you open the merge document.
This worked for me in Office 2003 Professional. I didn't test
it in other versions.

Hope that helps!

--
Ronald Nissley
A+, MCP