
Signature
-------------------------------------------------------------------------
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com
"Cindy M -WordMVP-" <C.Meister-C@hispeed.ch> a ?crit dans le message de
news:VA.0000933c.00b8ffec@speedy...
Hi Günter,
> 1. I use Word and Access 2000.
> 2. this is simple password protection.
OK. You can't do this with the default DDE connection
method on which the code in your original message is based.
ODBC, it appears, can handle it. Here's some sample code I
recorded in Word 2000; pay special attention to the PWD and
UID parts of Connection argument.
ActiveDocument.MailMerge.OpenDataSource Name:= _
"H:\PATH\SAMPLES\Northwind.mdb",
ConfirmConversions:= _
False, ReadOnly:=False, LinkToSource:=True,
AddToRecentFiles:=False, _
PasswordDocument:="", PasswordTemplate:="",
WritePasswordDocument:="", _
WritePasswordTemplate:="", Revert:=False,
Format:=wdOpenFormatAuto, _
Connection:= _
"DSN=MS Access
Database;DBQ=H:\Apps_E\O_2003\OFFICE11\SAMPLES\Northwind.md
b;DriverId=25;FIL=MS
Access;MaxBufferSize=2048;PageTimeout=5;PWD=test;UID=admin;
" _
, SQLStatement:="SELECT * FROM `Customers`",
SQLStatement1:=""
In order to record this on your own machine, activate the
"Select method" checkbox in the Open Datasource dialog box.
Note that if you've not used the full security the UID
(user identifier) for Access is always "admin".
Note: In your code snippet you tried putting the password
in the various password arguments of the OpenDatasource
method. These are for *WORD* files and have nothing to do
with the datasource.
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
:-)
G?nter Brandst?tter - 28 Jan 2004 18:37 GMT
Hi Cindy,
this helped me to clarify a bit. I also tried to edit the Connect-string,
but had no idea how to do it. Your solution helped me a lot.
Thanks again
G?nter
-------------------------------------------------------------------------
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com
"Cindy M -WordMVP-" <C.Meister-C@hispeed.ch> a ?crit dans le message de
news:VA.0000934f.005b3780@speedy...
> Hi G?nter,
>
[quoted text clipped - 44 lines]
> follow question or reply in the newsgroup and not by e-mail
> :-)