B
brodden
I have been trying to write a vba macro in Outlook that will give th
user a warning and not allow them to send a message if they don't pu
in a subject. Here is the code that I have so far:
Private Sub application_itemsend(ByVal item As Object, cancel A
Boolean)
If item.Subject = "" Then
cancel = True
Dim iMsgBoxSel
iMsgBoxSel = MsgBox("Please fill in the subject befor
sending.", vbSystemModal, "Missing Subject")
If iMsgBoxSel = vbOK Then
End If
End If
End Sub
Everything works perfectly, except that when the macro is done, th
main Outlook window becomes active and I can't figure out how to mak
the new message active again after the user hits OK.
Any suggestions would be greatly appreciated.
Thanks
user a warning and not allow them to send a message if they don't pu
in a subject. Here is the code that I have so far:
Private Sub application_itemsend(ByVal item As Object, cancel A
Boolean)
If item.Subject = "" Then
cancel = True
Dim iMsgBoxSel
iMsgBoxSel = MsgBox("Please fill in the subject befor
sending.", vbSystemModal, "Missing Subject")
If iMsgBoxSel = vbOK Then
End If
End If
End Sub
Everything works perfectly, except that when the macro is done, th
main Outlook window becomes active and I can't figure out how to mak
the new message active again after the user hits OK.
Any suggestions would be greatly appreciated.
Thanks