开发者

Extracting Macros in a Word Document to a text file from c#

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜