PC Review


Reply
Thread Tools Rate Thread

Access/Word 2007 Mail Merge Question

 
 
gant_g
Guest
Posts: n/a
 
      23rd Oct 2008
I have a couple issues with a mail merge that I need to get resolved. I have
a Access 2007 database that uses shared-level password. I have created a
dialog form that allows the user to enter a application number and select the
letter they wish to print from a drip down box. The problem is that when the
word document opens I get "Error has occured: Not a valid password" then the
Data Link Properties box opens and the box is checked to "Use a Blank
Password". If I uncheck the box and enter the database password I get another
box that asks me for the password again. Is there something that I can set so
that the "Use a Blank Password" box is no longer checked in the first dialog
box? The code I am using to perform the mail merge is below. In case you are
wondering it works fine if I remove the password from the database, but that
as is not an option because the database resides in a shared network area.

Thanks in advance for any help you can provide. :-)


'Create the Word instance and make it visible
Set objWord = GetObject(strFilePath, "Word.Document")
objWord.Application.Visible = True

'Open the data set from this database
objWord.MailMerge.OpenDataSource _
Name:=Application.CurrentProject.FullName, _
LinkToSource:=True, _
PasswordDocument:="'" & strPassword & "'", _
PasswordTemplate:="'" & strPassword & "'", _
WritePasswordDocument:="'" & strPassword & "'", _
WritePasswordTemplate:="'" & strPassword & "'", _
Connection:="QUERY Q_Letters", _
SQLStatement:="SELECT * FROM [Q_Letters] where [PK$ApplicationID] =
'" _
& appNumber & "'", _
OpenExclusive:=False
 
Reply With Quote
 
 
 
 
gant_g
Guest
Posts: n/a
 
      23rd Oct 2008
Double post please remove. Thanks

"gant_g" wrote:

> I have a couple issues with a mail merge that I need to get resolved. I have
> a Access 2007 database that uses shared-level password. I have created a
> dialog form that allows the user to enter a application number and select the
> letter they wish to print from a drip down box. The problem is that when the
> word document opens I get "Error has occured: Not a valid password" then the
> Data Link Properties box opens and the box is checked to "Use a Blank
> Password". If I uncheck the box and enter the database password I get another
> box that asks me for the password again. Is there something that I can set so
> that the "Use a Blank Password" box is no longer checked in the first dialog
> box? The code I am using to perform the mail merge is below. In case you are
> wondering it works fine if I remove the password from the database, but that
> as is not an option because the database resides in a shared network area.
>
> Thanks in advance for any help you can provide. :-)
>
>
> 'Create the Word instance and make it visible
> Set objWord = GetObject(strFilePath, "Word.Document")
> objWord.Application.Visible = True
>
> 'Open the data set from this database
> objWord.MailMerge.OpenDataSource _
> Name:=Application.CurrentProject.FullName, _
> LinkToSource:=True, _
> PasswordDocument:="'" & strPassword & "'", _
> PasswordTemplate:="'" & strPassword & "'", _
> WritePasswordDocument:="'" & strPassword & "'", _
> WritePasswordTemplate:="'" & strPassword & "'", _
> Connection:="QUERY Q_Letters", _
> SQLStatement:="SELECT * FROM [Q_Letters] where [PK$ApplicationID] =
> '" _
> & appNumber & "'", _
> OpenExclusive:=False

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access 2007/Word 2007 Mail Merge Opens Second Instance btibbet Microsoft Access 2 27th May 2010 07:24 PM
2007 Access Mail Merge with Word HayWal Microsoft Access 1 21st Jan 2009 04:20 PM
Access/Word 2007 Mail Merge Question gant_g Microsoft Access VBA Modules 0 23rd Oct 2008 04:23 PM
Word 2007, Access 2007 mail merge with Workgroup Information FileOptions Stapes Microsoft Access 0 22nd Apr 2008 05:46 PM
Word 2007, Access 2007 mail merge with Workgroup Information File Stapes Microsoft Access 0 18th Apr 2008 03:36 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:47 PM.