A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

ReplyRecipients



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 18th 07, 10:34 AM posted to microsoft.public.outlook.program_vba
Pete
external usenet poster
 
Posts: 4
Default ReplyRecipients

I would like a macro which I can assign to a button which is available for
every new Email message created, which sets a different reply to address.

I have no idea of the elements of the Outlook object, so any assistance with
the objects which require manipulating would be apprecaited.

P


Ads
  #2  
Old March 19th 07, 07:05 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default ReplyRecipients

Map a button to this macro; just change the e-mail address in the code:

Sub SetReplyToAddress()
Dim objMail As Outlook.MailItem
Dim objReplyRecips As Outlook.Recipients

If Application.ActiveInspector Is Nothing Then Exit Sub

Set objMail = Application.ActiveInspector.CurrentItem
Set objReplyRecips = objMail.ReplyRecipients
Do Until objReplyRecips.Count = 0
objReplyRecips.Remove (objReplyRecips.Count)
Loop

objReplyRecips.Add "

Set objMail = Nothing
Set objReplyRecips = Nothing
End Sub

--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"Pete" wrote:

I would like a macro which I can assign to a button which is available for
every new Email message created, which sets a different reply to address.

I have no idea of the elements of the Outlook object, so any assistance with
the objects which require manipulating would be apprecaited.

P



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:58 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.