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 / August 2004

Tip: Looking for answers? Try searching our database.

MailMerge DataSource problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Marty - 05 Aug 2004 14:03 GMT
Hi-

I'm running Word97. I have a DOT template which runs a
macro. In the macro, I have an ADO connection to get my
data. I also have WordBasic.MailMergeOpenDataSource
statement which keeps bombing out with error 1535, saying
that there were no records to be returned. This is
because the stored procedure is probably not returning
anything. (I want to eliminate the stored procedure, not
fix it.)

But I already have all the info that I need from the ADO
connection. And, I get this into the document using
ActiveDocument.Variables.Add commands.

How do I execute the Mail Merge without the stored
procedure?

Thanks for all the help.
Cindy M  -WordMVP- - 21 Aug 2004 12:12 GMT
Hi Marty,

I think you're a bit mixed up on what mail merge is, and
what it can, or cannot, do.

Mail merge only works with a data source stored as a file.
Mail merge puts data from this file into the merge fields.

It cannot pick up data from an ADO source in memory, nor
from Doc Variables in the document.

Which brings up the question in my mind, if you want to
detach the data source, why do you still want to execute the
mail merge? Are you wanting to get a new document to save?
Then use the SaveAs method on the document. Are you wanting
to print? Then use the PrintOut method.

> I'm running Word97. I have a DOT template which runs a
> macro. In the macro, I have an ADO connection to get my
[quoted text clipped - 11 lines]
> How do I execute the Mail Merge without the stored
> procedure?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun
8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:-)

Rate this thread:






 
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.