Microsoft KB Archive/817887

From BetaArchive Wiki
Knowledge Base


You receive a run-time error when you run VBA macro that contains the HTMLDocument property in Outlook 2003

Article ID: 817887

Article Last Modified on 2/1/2007



APPLIES TO

  • Microsoft Office Outlook 2003



SYMPTOMS

When you run a Microsoft Visual Basic for Applications (VBA) macro that contains the HTMLDocument property for Outlook Explorer, you may receive the following error message the first time you visit a Web page:

Run-time error: Out of memory or system resources. Close some windows or programs and try again.

CAUSE

This problem may occur if the Web Object Control (WebOC) has not been initialized before the "Explorer.HTMLDocument" statement in your macro runs.

WORKAROUND

To work around this problem, you may have to add a function to delay the execution of the remainder of your macro code to allow the WebOC to initialize.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Keywords: kbcode kbprogramming kbvba kbprb kberrmsg KB817887