on 05-10-2013 7:16 PM
I've had success stripping OLE wrappers from several different types of documents stored as blobs. In some cases I've removed members of compound files (e.g., doc), in some I've exported a member of a compound file (e.g., docx), and in others I've used OLE Automation (activate offsite!) to open the blob in the application and used olectrl.object.saveas to save off an unwrapped version of the file (e.g., xls, xlsx). Now I am tackling wpd (WordPerfect) files and no such luck on some of the files added with older versions of WordPerfect.
I can open the blob in WP using activate offsite but I can't figure out how to perform a saveas. I've used FileSave(<filename>) but it can't find that function. Given that I can't figure out how to strip the file, this seems like the way to go, although it is much slower than exporting or deleting members.
I don't believe that 'connecttoobject' will work for me because I don't think it can open the blob as it is.
I'm seeing information about CorelScript. Might that be an option?
If anyone has any experience with this and can shed some light that would be awesome.
Thanks, Harvey Kravis
Principal Software Engineer
Ellucian
Hi Harvey,
This guy shows how to do a SaveAs using OLE from VBScript. I'm guessing you can convert this logic to PB or C#.
http://www.robvanderwoude.com/vbstech_automation_wordperfect.php
hth,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've had success stringing OLE wrappers off of a number of different document types. However, I haven't tried WordPerfect. What I have seen is that the way you have to access the date differs greatly by document type.
What I had to do was use a utility like Compound File Explorer, figure out how the data was being embedded, and write a routine that stripped out the data for each different document type.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.