VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Export OLE Object (Excel) Text to File - VBA

2 REPLIES 2
Reply
Message 1 of 3
goodjuju
3706 Views, 2 Replies

Export OLE Object (Excel) Text to File - VBA

Hi,

 

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

 

Ian

 

 

Tags (4)
2 REPLIES 2
Message 2 of 3
vinayan
in reply to: goodjuju

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

 

http://forums.autodesk.com/t5/Visual-Basic-Customization/How-to-open-an-existing-OLE-excel-worksheet...

 

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

Message 3 of 3
goodjuju
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.

 

Thanks..

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost