Accessing the From Item

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

We would like to send a merged Word document as if it is
being sent by another person. I have a macro which places
a merged field address into
ActiveDocument.MailEnvelope.Item.To.
I would like to place the senders email addr into a
comparable ActiveDocument.MailEnvelope.Item.From field
using this macro, but this doesn't seem to work. I get
the 'does not support this property or method' error. I
am a delegate on the InBox for this person. We use
WindowsXP, OfficeXP with Outlook2002. Thanks.
 
You need to use CDO 1.21, Extended MAPI (C++ or Delphi only) or
Redemption (www.dimastr.com/redemption) to get the From address. It's
not exposed in the object model until Outlook 2003 comes out.

For a CDO 1.21 sample of getting From (CDO is an optional installation
for Outlook 2000 and later) see
http://www.slovaktech.com/code_samples.htm#FromAddress You will need a
project reference to CDO 1.21 for the sample to work.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm
 
Back
Top