Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA mailmerge from Excel

I have a problem starting Mailmerge from Excel. I've
created a macro in word that runs the mailmerge without
any problems. When I start word from Excel (which is also
the data source) I get a pop-up telling me that the excel
file is already open. I then need to choose read-only,
notify or cancel. This pop-up can take up to 60 seconds to
display. In the mean time the excel macro returns a error
message - 440 Method 'Run' of object '_Application' failed.

In debug the word code that takes a long time is.

Sub z_create_mail_merge(source As String)
'
' z_create_mail_merge Macro
' Macro recorded 2003/10/14 by TELUS
'
' Connection:="merge_it" is the range on the spreadsheet

ActiveDocument.MailMerge.MainDocumentType =
wdFormLetters
ActiveDocument.MailMerge.OpenDataSource Name:= _
source, _
ConfirmConversions:=False, ReadOnly:=True,
LinkToSource:=True, _
AddToRecentFiles:=False, PasswordDocument:="",
PasswordTemplate:="", _
WritePasswordDocument:="",
WritePasswordTemplate:="", Revert:=True, _
Format:=wdOpenFormatAuto, Connection:="merge_it",
SQLStatement:="", _
SQLStatement1:=""
....

Thanks in advance
Dave Baxandall

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I perform mailmerge in Excel Miki Excel Discussion (Misc queries) 1 February 22nd 07 02:08 AM
Excel Word - Mailmerge Peppermint Excel Discussion (Misc queries) 1 March 2nd 06 05:25 PM
can i use mailmerge to in excel like you would in word? acain1711 Excel Discussion (Misc queries) 3 February 7th 06 11:45 AM
How do I print labels after I have mailmerge on excel Bika Excel Discussion (Misc queries) 1 August 25th 05 03:25 PM
Mailmerge Master for use with Excel database Graham Excel Discussion (Misc queries) 2 February 12th 05 09:09 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"