Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating an Outlook Object
Message
From
17/05/2004 09:56:36
 
 
To
17/05/2004 08:13:36
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00904517
Message ID:
00904554
Views:
26
>local oApplication
>
>oApplication = createobject('Outlook.Application')
>
>if type('oApplication') = 'O'
> wait window 'Application ok'
> release oApplication
>else
> wait window 'Application !ok'
>endif
>
>Whe I run it once it works fine. But when I run it twice I get the OLE error code 0x80004002. What goes wrong? The same code with Win200, Office 200 and Fox 8 is runnig perfect.
>

This code leaves Outlook running with you having no way to access it.

I assume what you're doing here is testing this much of the code. Otherwise, it's just kind of silly.

What you need to do is add:

oApplication.Quit

before you release the variable.

Tamar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform