lambic
06-21-2006, 09:06 AM
Hi everyone,
This is my first post so please bear with me!
I'm using Office 2003
I'm trying to automate a mailmerge to Word from Excel. I have a button which poplulates a range in Excel & then opens Word to merge the range data into some labels.
The Excel part works fine & the Word merge document opens, but the merge fails. I have some code in the Word DocumentOpen event, which looks like this:
With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.Execute
However, the code fails at the:
.Destination = wdSendToNewDocument
line with the following error:
Run-time error '5852'
Requested object is not available
I'm tearing whats left of my hair out with this, has anybody got any ideas?
:dunno
Many Thanks
This is my first post so please bear with me!
I'm using Office 2003
I'm trying to automate a mailmerge to Word from Excel. I have a button which poplulates a range in Excel & then opens Word to merge the range data into some labels.
The Excel part works fine & the Word merge document opens, but the merge fails. I have some code in the Word DocumentOpen event, which looks like this:
With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.Execute
However, the code fails at the:
.Destination = wdSendToNewDocument
line with the following error:
Run-time error '5852'
Requested object is not available
I'm tearing whats left of my hair out with this, has anybody got any ideas?
:dunno
Many Thanks