![]() |
|
|
|
#1
|
|||
|
|||
|
Sorry, the other macro has some errors, this works:
Private Sub CommandButton1_Click() Dim workbook As InlineShape For Each workbook In ActiveDocument.InlineShapes Application.ScreenUpdating = False With workbook On Error Resume Next If .Type = wdInlineShapeEmbeddedOLEObject Then ''# Excel.Sheet.12 for Excel 2007 If .OLEFormat.ClassType = "Excel.Sheet.12" Then ''# Open Object as spreadsheet .OLEFormat.DoVerb wdOLEVerbPrimary ''# If you want, you can also do any updates here like .OLEFormat.Object.ActiveSheet.Cells(2, 2).Value = ".1" ''# Nasty - but it works - SendKeys SendKeys "{ESC}", True .OLEFormat.Object.Close End If End If End With Next Application.ScreenUpdating = True End Sub |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Embedded Excel Spreadsheet in Word Loses Ribbon | amoncur | Word | 0 | 07-03-2010 09:22 PM |
| Word Fill-in form with Excel spreadsheet | karik | Word | 0 | 01-11-2010 08:45 AM |
| Auditing on Excel and Spreadsheet documents | paulmills | Office | 0 | 12-08-2009 01:13 PM |
| How do I use an Excel form to populate and Excel spreadsheet | apostht | Excel | 0 | 05-21-2006 11:17 AM |