August 25, 2000 09:38 AM

Changing the Reply Address

Rating: (0)
Windows IT Pro
InstantDoc ID #15442
Les Landau, a reader from Australia, wants to use Outlook VBA to change the reply address for an outgoing message. Of course, in the Microsoft Outlook user interface (UI), which Figure 1 shows, he can change the reply address on a message's Options dialog box by typing the new address into the Have replies sent to: field—but that is a lot of clicking and typing. In this installment of Outlook VBA on Demand, I show you how to change the current message's reply address by adding a macro to an Outlook toolbar button. I also provide some useful techniques for getting input from a user and working with recipients.

Listi...

ARTICLE TOOLS

You must be a paid Professional Member to access this entire article.

Already a Professional Member? Please log in now:

NOT A PROFESSIONAL MEMBER? YOU CHOOSE:

Monthly or Annual

Professional Membership

VIP Membership

Compare Member Benefits

Add a Comment

Fantastic Code. You pull through yet again, Sue.
My only problem is that I get a security popup, it mentions something like a macro trying to access email addresses. I will try to find a way around this. In the meantime, if anyone else knows how to fix I would greatly appreciate the advice (I tried creating a certificate).
To the last anonymous poster; It hade bean nice if you learn to speel.

Anonymous User 6/7/2005 2:37:09 PM


It hade bean nice if you tell how to put your code in to outlook.

Anonymous User 4/7/2005 5:29:41 AM


Do you need all 4 lists if there is a fixed reply email address?

Anonymous User 4/1/2005 12:26:29 PM


Hello,

Can I display the text on the inputbox like a p***word ?

Julio.

Anonymous User 2/1/2005 4:18:04 PM


Replying to tricky amazon emails is covered here:

http://www.321books.co.uk/ebooks/outlook-vba-tutorial.htm



mal4mac9/17/2004 3:51:35 AM


Dan, what you might do is have a macros that you use only to reply to items in the other mailbox. That macro would set a different reply address.

SUE8/19/2004 6:44:14 PM


Gerry, the reply address for an account is set in the registry entries for that account or by the Exchange administrator. It's not accessible from Outlook objects.

SUE8/19/2004 6:43:12 PM


Is there any way to change the reply to address depending on what mailbox you are replying from. Eg. If I reply to an e-mail in my Inbox then the reply to is me, if I reply to an e-mail in a delegates mailbox, then the reply to is from the delegate.

Dan6/3/2004 8:51:30 AM


Is there a way that I can use a similar process to premanently set the reply to address without user interaction? Or maybe so that they are asked only once when the initially start Outlook?

Larry5/27/2004 9:53:30 AM


Thanks Sue - works a treat. This code just makes setting to a constant easier without multiple subs etc. Mind you use only once per message.

Sub ChangeReplyAddrNoPrompt()
Dim objApp As Application
Dim objItem As MailItem
Dim colReplyRecips As Recipients
Dim objReplyRecip As Recipient
Dim strRecipName As String

Set objApp = CreateObject("Outlook.Application")
Set objItem = objApp.ActiveInspector.CurrentItem

' ### USER OPTION - specify reply address ###
strRecipName = "bous@nowhere.man"


If objItem.Class = olMail And _
objItem.Sent = False Then

Set colReplyRecips = objMsg.ReplyRecipients
Set objReplyRecip = colReplyRecips.Add(strRecipName)
objReplyRecip.Resolve

End If

Set objItem = Nothing
Set objApp = Nothing
End Sub

Paul5/2/2004 8:26:00 PM


You must log on before posting a comment.

Are you a new visitor? Register Here

windows server 2008 login scripts

I have 2 win2k8 servers one pdc and bdc. The domain is exampledom.com They are connected to 2 iscsi luns which replicate each other. We are running ac...222-96118

advertisement

GOOGLE LINKS
SPONSORED LINKS
FEATURED LINKS

White Papers

Your remote offices contain valuable electronic data – are they adequately protected? Learn how proven technologies can reliably and cost-effectively back up a branch office from a central location, in real time, to disk or tape, and even utilize existing backup solutions.

Downloads

PacketTrap IT is a comprehensive and affordable network management and application monitoring solution that solves problems associated with bandwidth, network and application performance, and connectivity. Gain insight into your network - try PacketTrapIT free for 21 days!

Web Seminars

IT administrators have to solve a myriad of problems. This web seminar outlines the ten most common systems management pains - including managing highly distributed systems and dealing with data theft/loss – and the best practices to address each.

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.