ACC: OLE Automation Error Using Insert Method into MS Word (132130)
The information in this article applies to:
- Microsoft Access 2.0
- Microsoft Access for Windows 95 7.0
This article was previously published under Q132130 SYMPTOMS
Advanced: Requires expert coding, interoperability, and multiuser skills.
In OLE Automation, when you use the Insert method to insert text into a
Microsoft Word for Windows document, you may receive the following error
message:
In Microsoft Access version 7.0:
Invalid Use of Null
In Microsoft Access version 2.0:
The object cannot convert one of the arguments passed to the member.
CAUSE
You are passing a null value from Microsoft Access to the OLE Server
application.
RESOLUTION
In the event procedure or a custom function, add code to verify that the
value sent to the OLE Server is not a null. For example, you can add the
following code:
If Not IsNull(Forms![MyForm]![MyControl) Then
WordObj.Insert Forms![MyForm]![MyControl]
EndIf
REFERENCES
For more information about working with other applications using OLE
automation, search for "Working Across Applications" using the Microsoft
Access for Windows 95 Help Index.
Microsoft Access "Building Applications," version 2.0, Chapter 13,
"Communicating with Other Applications," pages 281-297
Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
---|
Keywords: | kberrmsg kbprb kbProgramming KB132130 |
---|
|