Outlook - macro to pickup addressee from To:

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

Outlook - macro to pickup addressee from To:

I'm using Outlook. I'd like to write a macro to pickup addressee from To:
and put into the body. The end result is to be "Hi John,^p"

When I used record a macro it did not pick up my copy and past from the
Outlook To: box. The rest works fine.



Regards, Mark
 
Outlook version?

FYI, you recorded a Word macro, which is why it picked up none of the
Outlook actions. Outlook doesn't have a macro recorder.
 
Thanks Sue,

Outlook 2003 SP1

Yes I realise that it is from Word and figured that was why it had not
picked it up.

Mark
 
The sample at http://www.outlookcode.com/codedetail.aspx?id=455 shows how to
insert text if WordMail is the editor. If you're not using WordMail, it gets
a bit more complicated, because you need to account for the message format.

The objInsp Inspector object in the code sample has a CurrentItem property,
which in turn gives you access to all the item properties like To.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top