Re: How to have MS Word Prompt for ODBC or connection login and password

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



> 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:
>
> -Tools>Letters and Mailing>Mail 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 :-)

.



Relevant Pages

  • Re: ASP - FROM statement slows down connection to database
    ... Open your database in Access, switch to the Queries tab, create a new query ... in Design View without choosing a table, swtich to SQL View, paste the sql ... connection string rather than using an ... recordset open statements. ...
    (microsoft.public.inetserver.asp.db)
  • Re: Update checking
    ... My thought was to use a simple query with a "username" param ... concurrency exceptions happen if the data you queried has ... > was and basically let the user work in a similar offline mode. ... Where does connection pooling come ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: MS Access looks for .mdb rather than Progress schema
    ... # Same query previously worked in Progress 8.x using SQL89. ... This entry allows you to keep your existing code written with the ODBC ... BTW, if you put all of the connect information into the connect string, ... I also tried putting the whole thing in the connection string: ...
    (microsoft.public.access.modulesdaovba)
  • Re: OpenDataSource & stored procedure
    ... recognises the ODBC escape syntax. ... You shouldn't need the connection parameter since Word gets it from the ... return multiple result sets - enough to confuse software such as MS Query ... >>> The call works in MSQuery but won't return the data to Word. ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Is yahoo being hijacked?
    ... I get no server response when query ... > Connection: close ...
    (misc.invest.stocks)