Inserting Text into the Subject Line

G

Guy Parry

Our company now insists that the message "Internet-
Authorised:" is inserted into the subject field of every
email sent via the internet. Is there any way that i can
insert a piece of text at the start of the 'Subject Line'
in a reply email, without having to reype it over and over
again i.e modifying a toolbar icon or some macro code??

Help would be appreciated
 
S

Sue Mosher [MVP]

Ugh. A bad idea, IMO. That said, here's one macro approach that does the
reply and the subject prefix all in one operation:

Sub ReplyWithSubjectPrefix()
Dim objApp As Outlook.Application
Dim objExpl As Outlook.Explorer
Dim objItem As Object
Dim objReply As MailItem
Dim strPrefix As String

' set subject prefix
strPrefix = "Internet-Authorised: "

' get the currently selected item and make sure
' it's a mail message
Set objApp = CreateObject("Outlook.Application")
Set objExpl = objApp.ActiveExplorer
Set objItem = objExpl.Selection(1)
If objItem.Class = olMail Then
' create reply
Set objReply = objItem.Reply
' add subject prefix
objReply.Subject = strPrefix & objItem.Subject
objReply.Display
End If

Set objApp = Nothing
Set objInsp = Nothing
Set objItem = Nothing
Set objReply = Nothing
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top