Change code in vbaProject.bin programmatically with C#

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Jan 2009
Posts: 7
Reputation: nattsurf123 is an unknown quantity at this point 
Solved Threads: 0
nattsurf123 nattsurf123 is offline Offline
Newbie Poster

Change code in vbaProject.bin programmatically with C#

 
0
  #1
Jul 13th, 2009
Hi,
I'm trying to insert vba code in a word .docm file through vbaProject.bin. I'm planning to use C# for this task. The part to change it to zip or use the System.IO.Packaging to open up the file doesn't seam to be a problem.
Through this tutorial:
http://www.codeproject.com/KB/cs/off...select=2005497
I understand that the vbaProject.bin is a OLE document container tree and that the vba code is inside a stream.
If I convert the byte array stream to a string I get a lot of junk and not a clear vba code string.
I hope this can be solved without installing any office product because I'm forced to run solution as lightweight as possible.

I would appreciate your advice on this.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC