View Single Post
  #2  
Old July 30th 07, 07:44 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Auto Add name at Salutation from the sender



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.

--
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,

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.

Ads