Hi all
I need some help in extracting embedded excel objects from a word document to a seperate folder.
I have recorded a macro which works fine upto opening the document but i am unable to save the document
please help me
Thanks,
Sampth
Printable View
Hi all
I need some help in extracting embedded excel objects from a word document to a seperate folder.
I have recorded a macro which works fine upto opening the document but i am unable to save the document
please help me
Thanks,
Sampth
We need more detail. I for one don't understand what you are trying to do.
It might also help to post the code you are working with.
hi
This is my code
[VBA]
Sub excelout()
Dim Ishape As InlineShape, Wdoc As Document
For Each Ishape In ActiveDocument.InlineShapes
With Ishape
If .OLEFormat.ClassType = "Excel.Sheet.8" Then
.OLEFormat.DoVerb VerbIndex:=1 '.Activate does work too but I wouldn't use it
Set Wdoc = ActiveDocument
End If
End With
Next Ishape
End Sub
[/VBA]
The problem is embedded excel document is opened but i am unable to save the opened excel
I am not following. You use Set Wdoc...but then never use it.
You can not save the opened Excel unless you have an Excel object instance to work with. Which you do not.
Please try and be clear when you ask things.
"I have recorded a macro which works fine upto opening the document but i am unable to save the document "
Document? A Word file is a document...an Excel file is NOT a document. What you are asking - I think - in the above quote is " i am unable to save the Excel file"...not document. True, you do state it better in your last post - "but i am unable to save the opened excel".
Using DoVerb will open Excel, but it does NOT create a VBA exposed instance of Excel. Make a real instance, then action it.
But it would be much easier if you stated things clear in the first place.