Hi,
I actually found the trick to work and it looks preety simple. Just had to initialise the form with a focus to one of its buttons and did the trick:
Private Sub UserForm_Initialize()
Me.CommandButton1.SetFocus
End Sub
Excuse me, but what makes you believe that I'm not showing the code I'm really using...?
Outlook 2007:
ThisOutlookSession:
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim strSubject As String
Dim myForm As New EmailPrioForm
strSubject = Item.Subject...
The code is as follows:
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim strSubject As String
strSubject = Item.Subject
If Len(Trim(strSubject)) = 0 Then
prompt$ = "Subject is Empty. Are you sure you want to send the Mail?"
If...
I did it and it does not work.
I call the ExampleForm.Show vbModal from the ItemSend, when I click on the email's send button the form appears but while the form is opened I can click (outside the form) on the email and make changes.
This is what I try to avoid. I do not want the user to be able...
I have created a VBA Macro which uses the ItemSend Even to modify the Subject of an email. Form within ItemSend I call a userform (ExampleForm.Show vbModal)with 3 buttons. The userform works perfectly well and when the user clicks a button the Subject is replaced and the mail is fired. However...
Hmmm, I see it is far more complicated than I initial thought. Thank you very much for your prompt response!!!
Anastasios
PS. If you come across with such sample of code, I'll welcome it!!! Thank you again!
Hi again,
thanks for your prompt support. The outlook version I use is 2007 and the aforementioned scenario took place with outlook opened. There is no possibility to run VBA on the other program. Is there any way to capture these events from within itemSend (from ThisOutlookSession)?
Thanks...
I have a working piece of code in the ThisOutlookSession that traps when the user is sending an email, except if the mail is sent from Word or Excel by using the Save&Send (as attachment or pdf) option.
I can't find any hint anywhere of how to make the code work also when doing it this way.
The...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.