View Single Post
  #5  
Old May 8th 06, 09:58 PM posted to microsoft.public.outlook.program_addins
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default add some text into an email automatically

Private Sub Application_ItemSend _
(ByVal Item As Object, Cancel As Boolean)
Dim strMsg As String
Dim res As Long
If Item.Subject = "" Then
Cancel = True
strMsg = "Please fill in the subject before sending."
MsgBox strMsg, _
vbExclamation + vbSystemModal, "Missing Subject"
Item.Display
End If
End Sub

For a more elaborate version that also checks for expected attachments, see http://www.outlookcode.com/codedetail.aspx?id=553

And for VBA basics, see http://www.outlookcode.com/d/vbabasics.htm


--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Denis Crotty" wrote in message ...
Hi,

I am looking into a similar function where I need to check the subject of
the outgoing email, did you get an example to start from on over riding the
send event?

--
Denis Crotty
Application Developer



"Nader" wrote:

thanks a lot !
"Thaddaeus Parker" a écrit dans le message de
news: ...
Your best bet would be override the Send event for the current Item
Inspector and then add your text. I have seen the process written here
before, but for the life of me can't remember it exactly.

I will do some research and give you a definitive answer later today.

Regards,

Thaddaeus.
"Nader" wrote in message
...
Hi,

I'd like to add some text to the body of an e-mail after the user as
click on the send button. What is the best way to do that.

Thanks in advance.






Ads