Printer not there

C

Curt

useing the following code I get message 5852 requested object not available?
Stumped as I print all the time I am running this macro from excel all code
is in same sub .destination = wdSendToPrinter------error 5852 is marked in
code also
Thanks
Dim word As New word.Application
Dim wordDoc As word.Document
word.Visible = True
ChangeFileOpenDirectory "\Parade"
Documents.Open Filename:="\ThankMailE.doc", ConfirmConversions:=False, _
ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
WritePasswordTemplate:="", Format:=wdOpenFormatAuto
With ActiveDocument.MailMerge
.destination = wdSendToPrinter------error 5852
' Application = ActivePrinter
'ActiveSheet.PrintOut
.MailAsAttachment = False
.MailAddressFieldName = ""
.MailSubject = ""
 
H

Helmut Weber

Hi Curt,

you got to fully qualify the word objects
when running the code from Excel,
like
word.Documents.Open
and
with word.ActiveDocument.MailMerge

--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

4198 debug 0
Macro fine in Word 2000... breaks in Word 2002...? 4
cancel print in macro 1
macro 2 issues 0
double merge 2
earlier thread posted 5
mailmerge recorded macro 0
Counting Merged Records 1

Top