Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I invoke a mail merge from Excel where my calling Excel workbook
(TestMailMerge.xls) is also the data source for the Mail Merge. When I close my Excel workbook, I get a message saying my Excel workbook is available for editing; an instance appears to have been opened as read-only by the Mail Merge. My mail merge code is as follows: ActiveDocument.MailMerge.OpenDataSource Name:= _ "C:\Documents and Settings\John Topley\My Documents\TestMailMerge.xls", _ ConfirmConversions:=False, ReadOnly:=False, LinkToSource:=True, _ AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="", _ WritePasswordDocument:="", WritePasswordTemplate:="", Revert:=False, _ Format:=wdOpenFormatAuto, Connection:= _ "Provider=Microsoft.Jet.OLEDB.4.0;Password="""";Us er ID=Admin;Data Source=C:\Documents and Settings\John Topley\My Documents\TestMailMerge.xls;Mode=Read;Extended Properties=""HDR=YES;IMEX=1;"";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:D" _ , SQLStatement:="SELECT * FROM `Year7$`", SQLStatement1:="", SubType:= _ wdMergeSubTypeAccess With ActiveDocument.MailMerge .Destination = wdSendToNewDocument .SuppressBlankLines = True With .DataSource .FirstRecord = wdDefaultFirstRecord .LastRecord = wdDefaultLastRecord End With .Execute Pause:=False End With My environment is Windows XP and and Excel/Word 2002. How can I close the Mail Merge instance of "TestMailMerge.xls" (Read only) and remove the "error" message? Thanks in advance for your help. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
merge two excel files like in word mail merge | Excel Discussion (Misc queries) | |||
Can anyone tell me how to do a mail merge from Excel? | Excel Discussion (Misc queries) | |||
How do I do an e-mail mail merge using an Excel spreadsheet? | Excel Worksheet Functions | |||
Code launches Mail Merge but disables the Mail Merge | Excel Discussion (Misc queries) | |||
mail merge excludes my headers and critical data in Word merge | Excel Discussion (Misc queries) |