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

Tip: Looking for answers? Try searching our database.

mailmerge.destination in Word 2003

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Matthew Fitzgerald - 07 Jan 2004 15:04 GMT
We have a powerbuilder application that offers a mail
merge option using an OLE object and MSWord.  It works in
versions of Word before Word 2003, but it does not work
in Word 2003.  There is an error accessing the
property 'Destination' at the following line:

lo_ole_word.ActiveDocument.MailMerge.Destination=0

It is our understanding that zero = create new Word Doc
and 1 = send to printer.  Has something changed in Word
2003?
Cindy M  -WordMVP- - 07 Jan 2004 17:04 GMT
Hi Matthew,

> We have a powerbuilder application that offers a mail
> merge option using an OLE object and MSWord.  It works in
[quoted text clipped - 7 lines]
> and 1 = send to printer.  Has something changed in Word
> 2003?

No, at least not as far as this value is concerned. 0 is
still equal to the enum wdSendToNewDocument.

Does sending to the printer work, or do you get an error
with that, too? I'd be more inclined to say that perhaps the
ActiveDocument is not a valid merge document when this
command tries to execute...

One way to test what might be going on is to have the macro
stop just before this point, with the Word window visible
and active. Now try to execute the mail merge to a new
document manually (in the UI). Can you do that, or do you
get an error message? And is it more informative?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:-)
Jeff Bean - 07 Jan 2004 20:57 GMT
>We have a powerbuilder application that offers a mail
>merge option using an OLE object and MSWord.  It works in
[quoted text clipped - 7 lines]
>and 1 = send to printer.  Has something changed in Word
>2003?

I encountered the same problem.  The MailMerge object is not getting
created because it couldn't open the data source.  What is happening is
that Word wants to display the warning "Opening this document will run
the following SQL command..." but the message is suppressed because the
merge is being run via automation.  So it acts as if the response to the
query was "no".  To make this work you either have to turn off
DisplayAlerts or you have to make a registry tweak to suppress that
particular warning:

http://support.microsoft.com/?kbid=825765

What's even more annoying is that I tested my application with the
public beta of Office 2003 and encountered no problems.  This warning
and the resulting problems were added to the final release.

Jeff Bean
CWC Software
 
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.