OberonPlace.com Forums

OberonPlace.com Forums (http://forum.oberonplace.com/index.php)
-   CorelDRAW/Corel DESIGNER VBA (http://forum.oberonplace.com/forumdisplay.php?f=16)
-   -   VBA hint to extract CorelDraw images from msWord.doc (http://forum.oberonplace.com/showthread.php?t=112)

Henri Socha 03-04-2003 18:18

VBA hint to extract CorelDraw images from msWord.doc
 
I am parsing an OLD ms Word document that contains CDraw4 objects.
While extracting other information I also need to extract the Draw objects
and save each to a seperate .cdr file. My script will be running from word and NOT from within Corel 10's VBA.

I can get to a word.paragraph that contains the object (and BTW only it).
What I need to do now is copy/paste only it into a new Corel document
that is sized width/height to exactly match the draw object and save it
as a new file under a name I will define.

Anybody have something close to this that can help?
BTW: If the object in word exactly matches what the data bytes would
be for a CorelDraw file, maybe I don't even need to use the Corel engine.
Just binary write the bits into the .cdr file but, will this work?

Thanks. and note, I have limited access to certain things.
Please email replies to SochaHJ@osd.Pentagon.mil


Finally Alex, my wife is also Ukrainian, from L'vov :-)

Alex 04-04-2003 12:11

Re: VBA hint to extract CorelDraw images from msWord.doc
 
Henri,

I doubt you can just save an OLE object stream in CDR file format. However your copy/paste approach might work. I'm not 100% sure on that one but you might want to copy the block from Word and just paste it into a new document in Draw, then save it. I'm not sure how Draw 4 objects would behave, so you might want to use Paste Special instead of just Paste (use CorelScript object for PasteSpecial).

Just need to experiment with this. Sorry I can't be any more precise, just a pointer for you to investigate. Should you have any further questions, post them here.


All times are GMT -5. The time now is 01:30.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com