Visual Basic Customization

Visual Basic Customization

Active Contributor
Posts: 45
Registered: ‎02-03-2005
Message 1 of 3 (1,627 Views)

Export OLE Object (Excel) Text to File - VBA

1627 Views, 2 Replies
02-08-2012 08:41 AM



I wonder if somebody could help me please.  I have searched the internet and forums for a solution but have drawn a blank.


I have a lot of AutoCAD files which have embedded OLE objects (excel) inside.  I want to be able to export only the text from the Excel OLE object using VBA (or Lisp, I don't mind which) without having to fire up the OLE application (i.e. Excel).  Does anyone if it is possible to do this? 


The embedded OLE objects have no link to any external files - so I imagine it must all be held somehow inside the AutoCAD file, but have no idea if or how it can be accessed?!!?


Any help anyone can offer is much appreciated.



Kind Regards





Posts: 13
Registered: ‎05-17-2009
Message 2 of 3 (1,602 Views)

Re: Export OLE Object (Excel) Text to File - VBA

02-13-2012 08:24 AM in reply to: goodjuju

Hi..this was pretty interesting..i looked for quite a few time in google before finally getting the below link


did not get the time to test any of it..its time to sleep now..i wonder why there is not much documentation around...hope you can get atleast get a start with this...

Active Contributor
Posts: 45
Registered: ‎02-03-2005
Message 3 of 3 (1,578 Views)

Re: Export OLE Object (Excel) Text to File - VBA

02-15-2012 04:07 AM in reply to: vinayan

Hi VBAChallenger,


Thanks for your reply.  I had also found the same post and stepped through the code.  It managed to fire up the OLE application and I suppose I could instantiate a loop to extract everything from all cells.


I was hoping to avoid having to open the OLE application from a debugging and speed point of view.


If I don't manage to find a solution I may have to look again at opening the OLE app, but I'm still hopeful there's a way without having to do this.


I'll update the post if I get any further.



Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.