Create mail via macro? (OL 2003)

  • Thread starter Thread starter j2
  • Start date Start date
J

j2

I need some way to create a mail from a macro. Or rather, i want to
create a plain-tex mail, with a given "to" adress, a set subject, and
then five lines of text in the body. We are using word as our editor
(can not be changed, so i guess i cant use aoutllok templates).

How the heck do i do this in a quick and easy way? Oh, and the
resulting macro or whathaveyou must be easily acessed by our entire
outlook-using organisation.
 
This Outlook 2003 VBA code would work:

Public Sub SendMail()
Dim objMsg As Outlook.MailItem
Set objMsg = Application.CreateItem(olMailItem)
With objMsg
.To = "(e-mail address removed)"
.Subject = "My Subject"
.BodyFormat = olFormatPlain
.Body = "My Text"
.Send
End With
Set objMsg = Nothing
End Sub

To make it available to everyone, you would have to export it, then tell
them how to import it and chagne their macro security.
 
Back
Top