Automation error

S

Sebho

hello,

under VB6 i try tu use outlook. This is ok but when i leave my app, the
OUTLOOK.EXE process persist (i see it in the task manager)
The next time that i start my app, i obtain an "Non specified error -
Automation error" at the createobject line.
i have to kill manually the OUTLOOK.EXE process in the tasm manager.

i'm under vb6 sp5 french and Win2k sp4 french and office SP3
see my code example

thank tou for your help
sebho
**********************************
Dim myO As Outlook.Application
Dim myNamespace As Outlook.NameSpace
Dim myFolder As Outlook.MAPIFolder
Dim myItem As Outlook.MailItem

Set myO = CreateObject("Outlook.Application")
Set myNamespace = myO.GetNamespace("MAPI")
Set myFolder = myNamespace.GetDefaultFolder(olFolderInbox)
Set myItem = myFolder.Items(1)

myItem.Display

'...

myItem.Close olDiscard
myO.Quit

Set myNamespace = Nothing
Set myFolder = Nothing
Set myItem = Nothing
Set myO = Nothing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top