Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help in tracking down this error

Status
Not open for further replies.

Kalisto

Programmer
Feb 18, 2003
997
GB
Hi,

I'm using Excel to automate a mailmerge in Word.

I can successfully call the Word object was you would any other, however when I execute the code below, I get an error (5852).

it is the line where I set Destination that is the problem.

Code:
 With WordApp.ActiveDocument.MailMerge
        .Destination = wdSendToNewDocument
        .Execute
    End With

Ive applied the fix as detailed at;


and I still get the same error.

(I have added Merge fields to the Object with no problem and this works
fine in Word itself, but not from Excel. Where am I going wrong?)

So, whats the next step in elimitating this problem?

Cheers

K
 
As your post appears to involve Excel and Word, but not Access, you might do better moing this question to the Visual Basic for Applications (Microsoft) Forum rather than here in Access!

Good Luck

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Damn, bad typo on my part. (Serves me right for writing on so little sleep.)

The database is in access.. :$

Sorry

K
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top