Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / December 2006

Tip: Looking for answers? Try searching our database.

How can I force an excel spreadsheet to be opened in word mailmergge as DDE?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bruce - 21 Dec 2006 16:32 GMT
I need to always merge from one excel spread sheet. One feild is larger that
256 char and so I need to open the speadsheet in DDE mode. Is there a way I
can force this to happen? I know abbout manually selecting DDE when I run
merge, but I am trying to automate this as much as possible, so I am TRYING
to do this with a macro...

Here is the macro I recorded trying to do it, but when I run it, is is not
in DDE mode:.(

Sub OpenInvoice()
'
' OpenInvoice Macro
' Macro recorded 12/21/2006 by
'
   Documents.Add Template:= _
       "C:\Documents and Settings\Bruce\Application
Data\Microsoft\Templates\Notary Invoice and worksheet.dot" _
       , NewTemplate:=False, DocumentType:=0
   ActiveDocument.MailMerge.OpenDataSource Name:= _
       "C:\Documents and Settings\Bruce\My Documents\Notary - Closing
Paperwork\Notary Info2.xls" _
       , ConfirmConversions:=True, ReadOnly:=False, LinkToSource:=True, _
       AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="",
_
       WritePasswordDocument:="", WritePasswordTemplate:="", Revert:=False,
_
       Format:=wdOpenFormatAuto, Connection:="Entire Spreadsheet",
SQLStatement _
       :="", SQLStatement1:="", SubType:=wdMergeSubTypeOther
End Sub
Peter Jamieson - 21 Dec 2006 18:47 GMT
Try:

ActiveDocument.MailMerge.OpenDataSource _
 Name:="C:\Documents and Settings\Bruce\My Documents\Notary - Closing
Paperwork\Notary Info2.xls", _
 Connection:="Entire Spreadsheet",  _
 SQLStatement:="", _
 SubType:=wdMergeSubTypeWord2000

If that doesn't work, it's probably a question of putting the correct SQL in
SQLStatement...

Peter Jamieson

>I need to always merge from one excel spread sheet. One feild is larger
>that 256 char and so I need to open the speadsheet in DDE mode. Is there a
[quoted text clipped - 26 lines]
>        :="", SQLStatement1:="", SubType:=wdMergeSubTypeOther
> End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.