J
John Mann
I am writing an application that works with Outlook - creating an instance
of "Outlook.Application" and find that by making Outlook visible it leaves
the instance of Outlook open when I release the reference to the
application.
I make it visible by
Dim inboxFolder As Outlook.MAPIFolder
Set inboxFolder =
gOutlookApp.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox)
inboxFolder.Display
Is there a way to hide Outlook again, or ensure that when I release the
instance of the object that instance of Outlook will close?
I can call the Quit method, but this appears to close all instances of
Outlook.
Note the reason I am making Outlook visible is because for some reason some
installs of Outlook 2000 do not appear to work with COM unless the
application is visible. When processing mail I get a message "Could not open
the item" - this message does not appear if the application is visible.
Note I have also tried using GetObject instead of CreateObject but this
appears to make no difference - it still creates a new instance of the
application.
of "Outlook.Application" and find that by making Outlook visible it leaves
the instance of Outlook open when I release the reference to the
application.
I make it visible by
Dim inboxFolder As Outlook.MAPIFolder
Set inboxFolder =
gOutlookApp.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox)
inboxFolder.Display
Is there a way to hide Outlook again, or ensure that when I release the
instance of the object that instance of Outlook will close?
I can call the Quit method, but this appears to close all instances of
Outlook.
Note the reason I am making Outlook visible is because for some reason some
installs of Outlook 2000 do not appear to work with COM unless the
application is visible. When processing mail I get a message "Could not open
the item" - this message does not appear if the application is visible.
Note I have also tried using GetObject instead of CreateObject but this
appears to make no difference - it still creates a new instance of the
application.