Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to be able to process a worksheet which is embedded in a Word document
using VBA code in an Excel Workbook. I have the following code which starts Word, opens the document, and finds the field which contains the Excel worksheet, but what property of the field can I use as a worksheet object. Dim appWord As Word.Application Dim wDoc As Document Dim wFld As Field Dim wWksht As Worksheet Set appWord = CreateObject("Word.Application") appWord.Visible = True appWord.Documents.Open _ "docdataset.doc", _ ReadOnly:=True, AddToRecentFiles:=False Set wDoc = appWord.Documents(appWord.Documents.Count) For Each wFld In wDoc.Fields If wFld.Type = wdFieldEmbed Then If Left$(wFld.Code.Text, 11) = "EMBED Excel" Then Exit For End If End If Next wFld Set wWksht = wFld.??????????? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Embedded Excel worksheet is too large for a Word page. How to fix | Excel Discussion (Misc queries) | |||
Excel crashes worksheet with VBA and Word with embedded worksheet | Excel Discussion (Misc queries) | |||
Excel with an embedded Word Doc | New Users to Excel | |||
Update cell selection of embedded worksheet in Word | Excel Programming | |||
excel with embedded word doc | Excel Programming |