If you've accessed the OLE Object, through OLEFormat, you should be able to perform DoVerb() on it to open it in its "parent" application. Then - assuming AutoCAD has an automation interface - you send the necessary automation commands through the object. If this were an Excel chart, for example, I'd use objWorkbook.SaveAs with the necessary parameters to save in whichever file format.
No idea about the AutoCAD object model, or even if it has one. -- -- Cindy
"sahmad" wrote:
[Quoted Text] > Hello All, > > I am writing a console based application using C# in which I want to > implement a feature which could extract OLE objects from Word documents > and then save it in DWG file format. The OLE objects exist in Word > documents are in the form of AutoCAD Drawing i.e. once I double clicked > the Object; the system opens it in AutoCAD 2000. > > Currently I have accessed the OLE object through "Word.InlineShape" > object by using Word Interop API but couldn't find any way to save it > in AutoCAD supported DWG file format. Does any one have any idea how > can I obtain a DWG file through the OLE object? > > Although I have extracted the OLE object in a BMP file by using > "Selection.EnhMetaFileBits" property but the requirement is to be > saved in DWG file format. I'll be grateful if any one could help. > > Thanks in advance! > -Shehzad > >
|