Reading Email Headers using VBA

  • Thread starter Thread starter Nigel
  • Start date Start date
N

Nigel

From Excel I wish to choose a selected outlook folder and read the email
header information (from to subject etc) and create the list in an Excel
worksheet. Is this possible? If so how can I determine the list of
folders, whether they contain email items, and then access the details?
TIA
 
Hi Nigel,

all top folders are availabe via Application.Session.Folders. Each
folder in turn contains a folders collection (expect Searchfolders in
OL03).

You could check a folder´s DefaultItemType property but that´s no
guarantor for its content in fact. For getting a list of all MailItems
in a folder you could use the Items.Restrict function and search for
MessageClass="IPM.Note".
 
many thanks

--
Cheers
Nigel



Michael Bauer said:
Hi Nigel,

all top folders are availabe via Application.Session.Folders. Each
folder in turn contains a folders collection (expect Searchfolders in
OL03).

You could check a folder´s DefaultItemType property but that´s no
guarantor for its content in fact. For getting a list of all MailItems
in a folder you could use the Items.Restrict function and search for
MessageClass="IPM.Note".
 
Back
Top