General information
Category:
COM/DCOM and OLE Automation
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only