• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 242
  • Last Modified:

outlook pst file contents

Is it possible to open and list attatchment files in an outlook.pst file ?

Reason : Users with v.large outlook files with stored exe files. Want to produce list to advise them to delete or store them elsewhere. Dont want to read their mail.
1 Solution
The only code to process pst files (since mickeysoft doesn't
publish the file format) is in outlook (or whatever Ms client
your using).

MS have given an API to access these files (as
well as other email functionality), and it's called

There are MAPI controls included with VB, but I'm
unsure that they give you all the functionality you
require (I think they do).

ZombiteAuthor Commented:
looked at the mapi
It only seems to open pst files in the workplace you are in eg my outlook files.
Unless I create a v.big outlook pointing to every ones pst files, dont see how to use mapi. basically I have personal directories under netware with the users pst files under each personal directory.
Would love it if mapi allowed you to specify pst location as say g:\personal\ed\outlook.pst but it doesnt, or I cant figure out how to.

So unless you have further info, I will have to reject the answer and open it up again to others.
Look at
and references below
Also I recommend to find Outlook Programming and Using Outlook Objects Model artincle on MSDN, if you are new to outlook programming.

the best way of doing such tasks in VB is using outlook object model. As your user all have outlook installed on their computers you will have no problems here. This is much easier then MAPI !

In your programm you ahould

1. Connect to Outook object and get references to MAPIFolders collection

2. iterate over each folder (or over folders with mail items)

3. in a folder get the collection of items which it contains.

4. iterate over ech item

5. for a specific item you can get Attachments collection. And for each attachment your can check its size, extention tc.

If you have Outlook 2000 you can write a macro on VB right there which will scann folders each time Outlook started. Otherwise write an external app on VB which will run periodically.

Good Luck
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now