Posted to microsoft.public.word.mailmerge.fields
|
|
excel merege Confirmation Dialog
Peter,
perfect went with the "SQLStatement," this is great since users never know
what is going on.
"Peter Jamieson" wrote:
1. I guess you have already taken account of the registry change
described in the following article:
http://support.microsoft.com/kb/825765/
2. There are a couple of other dialog boxes you might be describing.
a. The Confirm data source dialog box is displayed when Word can't
deterine what type of data source is being used. That behaviour depends
on the Word setting at
Office button-Word options-Advanced-Confirm file format conversion on
open
which you can set programmatically using
objWord.ConfirmConversions = False
b. the OLE DB Select Table dialog box. To avoid that, you need to
specify a SELECT query n your open data source,e.g.
objWord.MailMerge.OpenDataSource _
Name:="G:\cmcdb\Employees\" & _
[Forms]![001_Start]![consultant_ini] & _
"\Prospect_IA_Proposal.xlsx",
SQLStatement:="SELECT * FROM [Sheet1$]"
Peter Jamieson
http://tips.pjmsn.me.uk
On 27/01/2010 14:29, tighe wrote:
All,
Whenever I run an automated merge with excel as the data source a dialog box
appears and the user has to confirm the data source. How can I avoid this?
Set objWord =
appWord.Documents.Open("G:\cmcdb\20080922_CMCDB2\D ocuments\Ext_IA_prop_cvr_and_quote.dotm")
' Set the mail merge data source as the database.
objWord.MailMerge.OpenDataSource "G:\cmcdb\Employees\"&
[Forms]![001_Start]![consultant_ini]& "\Prospect_IA_Proposal.xlsx",
LinkToSource = True, ConfirmConversions = False
' Execute the mail merge.
objWord.MailMerge.Execute
If I merge in the same manner from a rtf file no further user input is
required.
This is a cross office product issue, I run this code from access, but
thought this the best place to post. I know you can cross post issues but
not exactly sure what the "use full USENET designation" would be.
Office 2007/XP
.
|