Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / January 2004

Tip: Looking for answers? Try searching our database.

Mail merge datasource

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
G?nter Brandst?tter - 27 Jan 2004 15:03 GMT
Hi all,
I have a mailmerge document, which opens a password-protected Access
database. How can I "automate" the password, so that I don't need to type it
every time?
I tried the code
objDoc.MailMerge.OpenDataSource Name:="Name of Database", ReadOnly:=True,
LinkToSource:=True, Revert:=False, Connection:="QUERY not yet printed",
AddToRecentFiles:=False, PasswordDocument:="Password",
PasswordTemplate:="Password"
but it does not work.

Any answer appreciated
G?nter

Signature

-------------------------------------------------------------------------
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com

Cindy M  -WordMVP- - 27 Jan 2004 17:49 GMT
Hi Günter,

1. Version of Word and Access involved?

2. Is this "simple" password protection, or the more complex user permissions?

> I have a mailmerge document, which opens a password-protected Access
> database. How can I "automate" the password, so that I don't need to type it
[quoted text clipped - 5 lines]
> PasswordTemplate:="Password"
> but it does not work.

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 - 27 Jan 2004 17:58 GMT
Hi Cindy,

1. I use Word and Access 2000.
2. this is simple password protection.

I hope you can help
thanks for your answer
G?nter

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,
>
[quoted text clipped - 19 lines]
> This reply is posted in the Newsgroup; please post any follow question or
> reply in the newsgroup and not by e-mail :-)
Cindy M  -WordMVP- - 28 Jan 2004 17:31 GMT
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
> :-)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.