Have Replies Sent To: VBA code

D

DStrong

OK, the scoop on my systems I am using, all machines are running XP Pro with
Office 2003 and exchange server(not sure of what version).

What we are trying to do is this, we have a group mail box that we want
people to reply to when we send them an email. We cannot send from the group
mailbox. The only way I have found to make this work is with the "Have
replies sent to" option. I have written a macro that uses sendkeys, yes I
know this is the worst way to do this. The macro causes the CAPS LOCL and NUM
LOCK to turn off when we use this macro.

I would like a cleaner way to get this done and have tried the only options
I have the main one at
http://windowsitpro.com/Articles/Index.cfm?ArticleID=15442. One other one by
Sue Mosher at
http://www.outlookcode.com/threads.aspx?forumid=3&messageid=13217 has not
worked for me either. Both give me an error saying that "sub or function not
defined" and highlights this line:
"Call AddReplyRecip"

I am at a loss as to a way to get this working. Any help from Sue would be
greatly appreciated.
 
J

JP

The VBA way is:

MailItem.ReplyRecipients.Add "(e-mail address removed)"

This will programmatically set the "Have Replies Sent To" option for
your Outlook message. I use it in the Application_ItemSend Event.

ps- do you find it awkward to have a maibox that cannot send messages?


--JP
 
D

DStrong

JP YOU ARE THE BEST!
It works like a charm. I cannot thank you enough!!!

PS we have personal mailboxes that we send from, but we do not answer those
emails if they send back to our personal box. We are only allowed to reply
from the group mailbox. It's too bad that we cannot send from the group box,
but that is the way it is.
 
J

JP

Glad to hear it worked!

--JP

JP YOU ARE THE BEST!
It works like a charm. I cannot thank you enough!!!

PS we have personal mailboxes that we send from, but we do not answer those
emails if they send back to our personal box. We are only allowed to reply
from the group mailbox. It's too bad that we cannot send from the group box,
but that is the way it is.
 

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