Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / July 2007

Tip: Looking for answers? Try searching our database.

Auto Add name at Salutation from the sender

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stephensaw - 30 Jul 2007 03:42 GMT
Hi,

I had touched with simple macros using macros recorder, but I cannot do the
following task with the recorder.

When I click on the "Reply" button to compose a reply email, I want my
Outlook to automatically add the recipient full name to the salutation line.
How could I do that?

Thanks.
Michael Bauer [MVP - Outlook] - 30 Jul 2007 06:44 GMT
You need a variable declared WithEvents in the module head to receive the
commandbar button click. You get that reference via
Application.ActiveExplorer.Commandbars.FindControl(,354).

In the button click event procedure, if you hit the button from the opened
item then set a MailItem variable to Application.ActiveInspector.CurrentItem
else to Application.ActiveExplorer.Selection(1).

That MailItem has a SenderEMailAddress property. Search that address within
your Contacts folder to get its FirstName, LastName and Title.

Signature

Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
 Organize eMails:
 <http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6>

Am Sun, 29 Jul 2007 19:42:04 -0700 schrieb Stephensaw:

> Hi,
>
[quoted text clipped - 6 lines]
>
> Thanks.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.