Retrieve actual value of .To without saving first?

  • Thread starter Steffen Grellmann
  • Start date
S

Steffen Grellmann

Hi newsgroup,

as you can see from the code snippet below I'm trying to read the
content from the "To" field of a new Outlook mailmessage. It seems
that the item has to been saved first in order to get the \actual\
value from the .To-field.

I guess some of you will recommend to work with the Recipients
collection instead. If doing so, saving the item seems to be required
too to get actual values.

Is there another way that does not require to save the item first?

Dim itm As Object
Set itm = ActiveDocument.MailEnvelope.Item

With itm
MsgBox .To
End With

Set itm = Nothing

Kind regards,

Steffen
 
S

Sue Mosher [MVP-Outlook]

itm.Recipients.Resolve should do the same thing as saving the item -- resolve
all recipient names to actual addresses.
 

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