A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

excel merege Confirmation Dialog



 
 
Thread Tools Display Modes
  #1  
Old January 27th, 2010, 03:29 PM posted to microsoft.public.word.mailmerge.fields
tighe
external usenet poster
 
Posts: 53
Default excel merege Confirmation Dialog

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

  #2  
Old January 28th, 2010, 12:31 AM posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
external usenet poster
 
Posts: 4,550
Default excel merege Confirmation Dialog

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

  #3  
Old January 28th, 2010, 06:25 PM posted to microsoft.public.word.mailmerge.fields
tighe
external usenet poster
 
Posts: 53
Default 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

.

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.