Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

listing Outlook VBAProject.otm contents

Status
Not open for further replies.

xift

Programmer
Jun 21, 2003
22
0
0
US
In most Office programs, the Application object has a VBE property that lets you list all of the modules and routines in a project (and modify etc), but Outlook doesn't appear to support this.

Does anybody know of a way to list the modules and routines in a VBAProject.otm file? Since the file seems to be in the structured storage format, would it be possible to access it that way?

I don't really need to modify modules like you can do with VBIDE, but if someone knows how to do that too, that would be cool.

I mainly want to just list each module name and its list of routine names. I would also like to list the first few comments per routine as well if possible.

Xift
 
Hi Xift,

Microsoft have, by design, made great efforts to reduce possible security loopholes to zero in Outlook. If you look at the dialog under Tools > Macro > Security > Trusted Publishers tab (XP and 2k3 only I think) you will see that the "Trust access to VB Project" option is greyed out so I suspect there is no way to do it.

Yes, the otm file probably is in structured storage format but the format is undocumented so you would have to guess at a lot of things. If you are happy to work with a separate file just to extract information, the thing to do is probably to export the module to a text file which would be relatively easy to process - scan for sub or function and then pick up following lines that start with '.

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top