M
Mo
The situation is as follows:
I get a 'runtime error 5852. Run-time error '5852'. Requested object is
not available' message when I use Access 2003 to send data to a word
(2003) mailmerge document.
Prior to going over to Office 2003 we have not had any problems with
this functionality.
So far I've tried the suggestions in these two MS articles:
http://support.microsoft.com/kb/913804/
http://support.microsoft.com/kb/825765/
So far neither of these have worked.
Anyone have any idea what else it could be and how to resolve this?
The VBA I'm using is MS standard:
If CreateWordObj() Then
With gobjWord
.Visible = True
.Documents.Open "C:\screening\template.doc"
DoEvents
With gobjWord.ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.SuppressBlankLines = True
.Execute
End With
.ActiveDocument.PrintPreview
.Visible = True
End With
End If
Thanks for any help,
Mo
----------------------------------------
Mohamed Joomun
Database Programmer, CEPM
Wolfson Institute of Preventive Medicine
Barts and The London
Queen Mary's School of Medicine and Dentistry
Charterhouse Square, London EC1M 6BQ, UK
Tel: +44 (0)20 7882 6265
Fax: +44 (0)20 7882 6270
E-mail: (e-mail address removed)
I get a 'runtime error 5852. Run-time error '5852'. Requested object is
not available' message when I use Access 2003 to send data to a word
(2003) mailmerge document.
Prior to going over to Office 2003 we have not had any problems with
this functionality.
So far I've tried the suggestions in these two MS articles:
http://support.microsoft.com/kb/913804/
http://support.microsoft.com/kb/825765/
So far neither of these have worked.
Anyone have any idea what else it could be and how to resolve this?
The VBA I'm using is MS standard:
If CreateWordObj() Then
With gobjWord
.Visible = True
.Documents.Open "C:\screening\template.doc"
DoEvents
With gobjWord.ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.SuppressBlankLines = True
.Execute
End With
.ActiveDocument.PrintPreview
.Visible = True
End With
End If
Thanks for any help,
Mo
----------------------------------------
Mohamed Joomun
Database Programmer, CEPM
Wolfson Institute of Preventive Medicine
Barts and The London
Queen Mary's School of Medicine and Dentistry
Charterhouse Square, London EC1M 6BQ, UK
Tel: +44 (0)20 7882 6265
Fax: +44 (0)20 7882 6270
E-mail: (e-mail address removed)