Techniques for Diagnosing & Resolving OLE Automation ErrorsLast reviewed: September 6, 1996Article ID: Q137029 |
The information in this article applies to:
SUMMARYApplications using OLE Automation may encounter either one of the following two errors:
429 - OLE Automation server can't create object 438 - OLE Automation no such property or methodThis article presents some techniques for resolving these errors.
MORE INFORMATION
Error 429Error 429 typically occurs during a CreateObject call. There are several causes for this error:
Error 429: Low System ResourcesLow system resources are a factor when CreateObject is used to load a specified application that doesn't already exist in memory. You can check system resources and memory at any time by clicking About Program Manager on the Help menu of the Windows Program Manager. To test memory if you get error 429 in your Visual Basic code, switch to the Program Manager, and try to load the application. If you can't, you are low on system resources or memory. If you can, there may be a problem with either the syntax within CreateObject or with the registry.
Error 429: Corrupt or Invalid OLE RegistryIf the OLE Registry is corrupted or invalid, you can use the following steps to restore it:
Error 429: Lost Connection with the OLE ServerFinally, the connection to an object may have been lost. The following code can demonstrate how this can happen:
Dim LoadDC as Object Dim LoadWd as Object Set LoadDC = CreateObject( "Word.Document.Doc" ) Set LoadWd = LoadDC.Application.WordBasic Set LoadDC = Nothing LoadWd.FileOpen ...As it stands, this code may generate error 429. If the third line of code setting LoadDC to nothing is removed or changed to a comment, it works.
Error 438Error 438 can be generated when the OLE object created does not recognize the method or property you are attempting to use. This could be something as simple as a syntax error (the method or property you are trying to use is misspelled in your code). Or it could be because the object's connection is no longer available. Consider the following scenario with OLE Automation between Visual Basic and Microsoft Word:
REFERENCESThe Office Developers Kit, currently shipping with Visual Basic, is an excellent resource for demonstrating how to use OLE Automation effectively with Visual Basic. It comes with a CD-ROM compact disc filled with technical information and reference material, as well as numerous samples. For more information on how to obtain the Office Developers Kit, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q92545 TITLE : Visual Basic 3.0 Common Questions & Answers |
Additional reference words: 3.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |