View Full Version : extract embedded excel objects from word
sampath_123
05-14-2009, 10:00 AM
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
lucas
05-14-2009, 11:30 AM
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.
sampath_123
05-15-2009, 09:01 AM
hi
This is my code
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
The problem is embedded excel document is opened but i am unable to save the opened excel
fumei
05-20-2009, 11:04 AM
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.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.