You forgot to provide your Outlook version.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
<(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> Hi,
>
> I want to write a macro in Outlook to reply to messages (when they
> arrive) depending on the subject line. But no issues if the mail's
> subject line doesn't match with the criteria. I am able to compose and
> send mail to a particular recipient but not to the sender back. Please
> suggest some code to get the details of the sender from the current new
> mail. I have written my code in the Application_NewMail() event; so
> that it acts when new mail arrives to my inbox (outlook).
>