Thread: [Solved] Changing the From field
View Single Post
 
Old 10-22-2010, 09:07 PM
jerem jerem is offline Windows XP Office 2003
Novice
 
Join Date: Mar 2010
Posts: 6
jerem is on a distinguished road
Default Changing the From field

I work from a shared inbox (Outlook 2003) and whenever I reply or forward from that box I need to change the From field to be my email address not the shared inbox name. I have been just typing in my name there, but I want to address this programatically. I don't see any where to address this code-wise (i.e. objForward.From) so I'm thinking maybe the focus can be set to the From field and then have a string (which is my email addressed) plopped in there to accomplish this. I cannot use On behalf of, nor set this address any other way since I don't have administrative rights to alter this box. Any ideas, suggestions, etc. Oh, and keep in mind I'm a novice at this. I just copied this code below (which was doing something else) and changed it to suit my purposes. Thanks for your help.


Sub ForwardToMe()
Dim objMsg As Object, objMailItem As Outlook.MailItem, objForward As _
Outlook.MailItem
Set objMsg = Application.ActiveExplorer.Selection.Item(1)
If objMsg Is Nothing Then Exit Sub
If objMsg.Class <> olMail Then Exit Sub
Set objMailItem = objMsg
Set objForward = objMailItem.Forward
objForward.To = "email address"
Reply With Quote