PC Review


Reply
Thread Tools Rate Thread

Application failure in outlook 2003 following VBA macro

 
 
=?Utf-8?B?bWxo?=
Guest
Posts: n/a
 
      2nd Jun 2005
Hi I have run in to the following problem, that took som time debugging:

if I write this

Dim olApp As Outlook.Application

Set olApp = CreateObject("Outlook.Application")

In a macro in outlook 2003. (I copyed it from the builtin help).

The macro runs fine, but when I later close outlook I get an Application
failure reason: 0xc0000005. that I enterpret as VBA trying to ilegally acces
memory.

Altering to:

Dim olApp As Outlook.Application

Set olApp = Outlook.Application

solves this problem.





--
Michael L. Holm
 
Reply With Quote
 
 
 
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      2nd Jun 2005
That statement is unnecessary, since Outlook VBA supports a built-in Application object that you should be using instead, which is what your second version does.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"mlh" <mlh_hwh(remove this)@post9.tele.dk> wrote in message news:CF5B2F95-0FED-4FED-8CCF-(E-Mail Removed)...
> Hi I have run in to the following problem, that took som time debugging:
>
> if I write this
>
> Dim olApp As Outlook.Application
>
> Set olApp = CreateObject("Outlook.Application")
>
> In a macro in outlook 2003. (I copyed it from the builtin help).
>
> The macro runs fine, but when I later close outlook I get an Application
> failure reason: 0xc0000005. that I enterpret as VBA trying to ilegally acces
> memory.
>
> Altering to:
>
> Dim olApp As Outlook.Application
>
> Set olApp = Outlook.Application
>
> solves this problem.
>
>
>
>
>
> --
> Michael L. Holm

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook 2000 Application Failure Event ID 1000 WantaDA40 Microsoft Outlook Discussion 1 31st May 2010 08:20 AM
Excel 2003 pivot table generates application failure =?Utf-8?B?QnJlbnQgQWxiZXJ0c29u?= Microsoft Excel Crashes 0 3rd Oct 2007 06:38 PM
Excel 2003 Macro Certificate Failure - Help! =?Utf-8?B?QmlsbEBET1Q=?= Microsoft Excel Programming 3 28th May 2005 10:39 PM
Outlook 2003 Archiving failure with SBS 2003 =?Utf-8?B?Um9iIEEu?= Microsoft Outlook 0 18th Nov 2004 01:44 PM
Outlook 2003/ Norton IS 2004 Outlook AntiSpam Plug-in Failure John de-Pulford Microsoft Outlook 2 6th Aug 2004 05:40 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:32 PM.