Re: closing outlook object
Hi,
You could try this:
Just a thought.
sparrow1
Re: closing outlook object
yes, i know that .. but where do i put that? oMsg is closed when the user press yes to send the message. So i cant put it on the end of the code. Can i use an event?
When i put oApp.Close at the end of the code, oMsg is closed before the users can make an email and sent it.
oMsg_Close Then oApp.Close something like that
Re: closing outlook object
You don't need to call it explicitly. If you put this code before calling oMsg.Display():
Code:
AddHandler oMsg.Unloaded, AddressOf oMsg_Unloaded
And add this sub to your app:
Code:
Private Sub oMsg_Unloaded()
MessageBox.Show("Unloaded")
End Sub
You'll see that the oMsg object is disposed when you close your form.