johncassell
05-18-2015, 02:43 AM
Hi all, I am using this procedure which checks some things before the users email is sent.
Public Sub Application_ItemSend(ByVal item As Object, ByRef Cancel As Boolean)
It opens a form but I have a problem whereby when the form opens, the email I am composing is replaced by any one of the other emails that I am composing and it sends that other one instead. I have found a workaround in that if I specify 'item.display' when the form is closed, it brings up my correct email and then sends it perfectly.
My only problem now is that the user will be confused because when my form pops up because the wrong email is suddenly in the background - they will think its going to send that wrong email.
I'm looking in Private Sub UserForm_Activate() and was hoping to put 'item.display' somewhere in there so that as soon as the form is opened, the correct email is brought back into the background and my users are none-the-wiser.
However, I cant find a way of telling my userform what the 'item' is (I get Runtime error - Object Required).
Would anyone be able to tell me how to achieve this please. I am using Outlook 2003.
Thanks
John
Public Sub Application_ItemSend(ByVal item As Object, ByRef Cancel As Boolean)
It opens a form but I have a problem whereby when the form opens, the email I am composing is replaced by any one of the other emails that I am composing and it sends that other one instead. I have found a workaround in that if I specify 'item.display' when the form is closed, it brings up my correct email and then sends it perfectly.
My only problem now is that the user will be confused because when my form pops up because the wrong email is suddenly in the background - they will think its going to send that wrong email.
I'm looking in Private Sub UserForm_Activate() and was hoping to put 'item.display' somewhere in there so that as soon as the form is opened, the correct email is brought back into the background and my users are none-the-wiser.
However, I cant find a way of telling my userform what the 'item' is (I get Runtime error - Object Required).
Would anyone be able to tell me how to achieve this please. I am using Outlook 2003.
Thanks
John