Q: some basic help

  • Thread starter Sue Mosher [MVP-Outlook]
  • Start date
S

Sue Mosher [MVP-Outlook]

Assuming I invoke my macro while a message is displayed in the pane of the
main outlook window

(e.g. Tools:Macro:Macros:xxx [Run])

What objects and/or methods do I use in the macro to get at the message?

Application.ActiveExplorer.Selection(1) returns a single selected item.
I want my macro to be able to "read" the message body, and the text of the
internet headers, and to get the smtp envelope details (assuming it is
that kind of message).

That will require CDO 1.21 or, to avoid security prompts, Redemption (http://www.dimastr.com/redemption/), because the header is exposed only through a MAPI property. See http://www.outlookcode.com/d/forms/headers.htm for a sample Outlook form that demonstrates the technique.

FYI, there is a newsgroup specifically for general Outlook programming issues "down the hall" at microsoft.public.outlook.program_vba or, via web interface, at http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.outlook.program_vba

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
M

Malcolm Dew-Jones

Hello

I use VB in various MS apps from time to time, but I'm not very familiar
with using it in outlook (Microsoft Office Outlook 2003 SP2 to be
precise.)

So I am looking for a few brief pointers, or links to good examples.

Assuming I invoke my macro while a message is displayed in the pane of the
main outlook window

(e.g. Tools:Macro:Macros:xxx [Run])

What objects and/or methods do I use in the macro to get at the message?

I want my macro to be able to "read" the message body, and the text of the
internet headers, and to get the smtp envelope details (assuming it is
that kind of message).

Feedback appreciated.

Thanks
 

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