Skip to Content
author's profile photo Former Member
Former Member

stripping wordperfect ole blobs

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


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on May 13, 2013 at 04:20 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 13, 2013 at 06:04 PM

    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#.



    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks for the idea, but I don't think this will work for me. He is opening an existing, valid document. I need to start WP using activate offsite. Once I do that I don't seem to have access to WP OLE.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.