Bug 59302

Summary: Add support for reading VBA projects in HSLF
Product: POI Reporter: Javen O'Neal <onealj>
Component: HSLFAssignee: POI Developers List <dev>
Severity: enhancement CC: tallison
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: All   
Attachments: just a quick hack ...

Description Javen O'Neal 2016-04-11 16:47:33 UTC
HSLF doesn't have VBAInfo or VBAInfoAtom classes, or classes to look inside the external ole compressed container.
Comment 1 Nick Burch 2016-04-11 16:52:37 UTC
See http://poi.apache.org/poifs/embeded.html#Files+embedded+in+PowerPoint - PPT files are "special" (different team at Microsoft wrote it?), and embedded resources go in special records rather than at the OLE2 level...

I suspect you'll need to do something similar to Tika's HSLFExtractor's handleSlideEmbeddedResources method
Comment 2 Javen O'Neal 2016-04-11 17:18:40 UTC
Thanks for the info. I'll try to figure this out. LibreOffice 5 can't find the VBA Project in test-data/slideshow/SimpleMacro.ppt, which I created with PowerPoint 2007.
Comment 3 Javen O'Neal 2016-04-11 21:47:01 UTC
Format information is available in:
[MS-PPT]: PowerPoint (.ppt) Binary File Format Open Specifications Documentation [1]

[1] https://msdn.microsoft.com/en-us/library/office/cc313106%28v=office.12%29.aspx
Comment 4 Andreas Beeker 2016-04-12 00:09:35 UTC
Created attachment 33754 [details]
just a quick hack ...

This is just a quick hack ... to get you started.
Comment 5 Tim Allison 2016-10-19 11:59:29 UTC
*** Bug 60162 has been marked as a duplicate of this bug. ***
Comment 6 Tim Allison 2016-10-19 18:49:27 UTC

I made a few small changes (thanks to TestReWrite for finding one small bug!), but I basically left Andi's patch as is.

This will offer at least basic access to VBAMacros. 

I've tried to add info in the javadocs about how ppt is not supported by VBAMacroReader directly.

We can work on integrating macro extraction across the file types in another issue.  For now, advanced users have what they need.