Hello.
I have a word document containg several pictures from Excel spreadsheet. These pictures were entered into Word using the Paste Special as 'Microsoft Excel Worksheet Object; without paste links.
I need to write a macro in Word to check the validations of the amounts within that embeded object and I am struggling to open the embedded object into Excel.
Here is my code so far...
Sub EditEmbeddedWkb()
Dim wdOle As OLEFormat
Dim xlApp As Object
Dim xlWkb As Object
Dim myDoc As Document
Set myDoc = Documents("SOA 07-08.doc")
myDoc.Activate
Selection.GoTo What:=wdGoToPage, Count:="22"
Selection.GoTo What:=wdGoToObject, Which:=wdGoToNext, Count:=1, Name:="Excel.Sheet.8"
'here is an error!
Selection.ShapeRange(1).OLEFormat.DoVerb VerbIndex:=1
End Sub
I am able to go to page 22, and I needed to activate and open the picture on that page into Excel so therefore I can pick up the amount in relevant cell.
I have a word document containg several pictures from Excel spreadsheet. These pictures were entered into Word using the Paste Special as 'Microsoft Excel Worksheet Object; without paste links.
I need to write a macro in Word to check the validations of the amounts within that embeded object and I am struggling to open the embedded object into Excel.
Here is my code so far...
Sub EditEmbeddedWkb()
Dim wdOle As OLEFormat
Dim xlApp As Object
Dim xlWkb As Object
Dim myDoc As Document
Set myDoc = Documents("SOA 07-08.doc")
myDoc.Activate
Selection.GoTo What:=wdGoToPage, Count:="22"
Selection.GoTo What:=wdGoToObject, Which:=wdGoToNext, Count:=1, Name:="Excel.Sheet.8"
'here is an error!
Selection.ShapeRange(1).OLEFormat.DoVerb VerbIndex:=1
End Sub
I am able to go to page 22, and I needed to activate and open the picture on that page into Excel so therefore I can pick up the amount in relevant cell.