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
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