Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Rose B Rose B is offline
external usenet poster
 
Posts: 4
Default Mail Merge and Access

I have an Access application distributed to users of Office 2003 and Office
2007 via a runtime 2007 front end. The application needs to trigger a Mail
Merge
which will use query results in back end, which is protected by a password.

I have coded VB to cope with this in an Office 2007 environment - but
when running with Office 2003 Word is asking for the data source when
initially opening the mail merge document from Accesss; when opened directly
it does not ask for the data source and when responding with "No" to the SQL
prompt it opens fine. You don't actually have to choose a data source when
asked, just click on "Open" and all is well. Can anyone help?

My code is

With myWordDoc.MailMerge
.OpenDataSource Name:="", ConfirmConversions:=False,
ReadOnly:=False, LinkToSource:=False, _
AddToRecentFiles:=False, PasswordDocument:="",
PasswordTemplate:="", _
WritePasswordDocument:="", WritePasswordTemplate:="",
Revert:=False, _
Format:=0, _
Connection:="DSN=MS Access Database;DBQ=" & DataSource &
";DriverId=25;FIL=MS
Access;MaxBufferSize=2048;PageTimeout=5;PWD=mypass word;UID=admin;" _
, SQLStatement:=mySQL, SQLStatement1:="", SubType:=1
.Destination = myDestination
.SuppressBlankLines = True
With .DataSource
.FirstRecord = 1
.LastRecord = -16
End With
.Execute Pause:=False
End With
 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge with Access Marly Mailmerge 1 June 3rd 08 10:54 PM
Mail Merge .bmp from access? pope Mailmerge 2 February 16th 07 07:06 AM
Mail merge using Access Geoff Mailmerge 5 November 6th 06 02:19 PM
word opens access in mail merge. Access is already opened.=twice Sherri Mailmerge 1 February 11th 06 05:59 PM
Mail Merge from Access ken a Mailmerge 1 March 14th 05 01:07 PM


All times are GMT +1. The time now is 11:24 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"