- Read Office Files
- Posted by miztaken on May 20th, 2008
Hi there,
I want to read my Office Files (DOC,XLS and PPT) files using ole32.dll
and C++ or C++.NEt.
I have googled a bit and found that i can read the contents of DOC
file by using Stogare and Stream, or let me say ole32.dll.
But i dont know how to read other things like embedded attachments.
Actually i want to dump all the embedded attachments of DOC file to my
hard drive for further processing.
So can any one please help me get the info i need.
I am unable to find any tutorial or references to ole32.dll and how to
use it to extract embedded attachments from DOC file.
Please help me, i would be very much grateful.
Thank you
miztaken
- Posted by Christian ASTOR on May 20th, 2008
On 20 mai, 13:16, miztaken <justjunkt...@gmail.com> wrote:
Use OLE Automation.
(InlineShapes)
- Posted by miztaken on May 21st, 2008
Do you mean using COM Component exposed by Microsoft i.e. Microssot
Word 11.0 Object Library.
If yes.
I have tried that and it can extract only Office attachments (DOC,XLS
and PPT) from Office Files.
If PDF or ZIP or any other files are embedded inside office file then
it can extract them.
The only thing we can do is active the object.
I want to save those objects/
If i am wrong then please shade some light on this.
Thank you
- Posted by Christian ASTOR on May 22nd, 2008
On 21 mai, 11:09, miztaken <justjunkt...@gmail.com> wrote:
It works for me (tested with embedded zip files) by selecting each
object and copying to clipboard.
("Select" method, ""Selection" property, "Copy" mehod)
Then I paste it to an IE window (IWebBrowser2) and I get the embedded
zip files
- Posted by miztaken on May 23rd, 2008
hi Christian,
I am doing like this:
//wordshape is InlineShape's Object
wordshape.Select();
wordshape.Application.Selection.Copy();
Now where to paste.
I want to save the object in my disk?
what should be my next step.
Can you show me using a code snippet?
Thank You
- Posted by Christian ASTOR on May 24th, 2008
miztaken wrote:
With IWebBrowser2 (not visible)
CLSIDFromProgID() of "InternetExplorer.Application"
CoCreateInstance()-QueryInterface()
::Navigate() to a path
::get_HWND() to get WB hWnd, then I send paste command.