I need to extract all VBA code from a Word 2007 document in c# without using office automation.
What I have done so 开发者_StackOverflow中文版far is to open the Word document as a structured storage file in c#, and I receive a list of the following streams:
Macros
VBA
dir ( stream )
Module1 ( stream )
ThisDocument ( stream )
_VBA_PROJECT_ ( stream )
....
I gather that the source is stored in one of those streams, but I have no idea how to parse them.
Can anyone help?
Probably the documentation of the VBA file format will help you. You can download it for free from Microsoft:
[MS-OVBA]: Office VBA File Format Structure Specification
精彩评论