Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Extracting Text from Embedded Word Documents in Excel
I have a report that uses embedded Word documents in Excel for a technician
to write a narrative on a project in addition to his/her measurements that are entered in Excel's cells. I am looking for an automated way to open an embedded Word document in the Excel report, extract the text from the Word document, and paste it into a separate excel file. Is this possible? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Extracting Text from Embedded Word Documents in Excel
Would not be more simple to enter the text into Excel and drop the Word
aspect ? Unless you <really need the bells and whistles that a word processor offers. Anyway, this is by no means great, but works and should give you a starting point. You can change to late binding late, once you have the Word code figured out. Private Sub CommandButton1_Click() Dim WordDoc As OLEObject Dim WordApp As Word.Application Set WordDoc = ActiveSheet.OLEObjects(1) With WordDoc .Activate Set WordApp = .Object.Application End With With WordApp .ActiveDocument.Select .Selection.wholestory .Selection.Copy .ActiveDocument.Close False .Quit End With Range("A1").Select ActiveSheet.PasteSpecial Format:="Unicode Text" End Sub NickHK "Marc C" wrote in message ... I have a report that uses embedded Word documents in Excel for a technician to write a narrative on a project in addition to his/her measurements that are entered in Excel's cells. I am looking for an automated way to open an embedded Word document in the Excel report, extract the text from the Word document, and paste it into a separate excel file. Is this possible? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
embedded documents - label text reverts to a default | Excel Discussion (Misc queries) | |||
Extracting specific data from inconsistant multiple word documents | Excel Discussion (Misc queries) | |||
Extracting text from embedded Word Object | Excel Programming | |||
How to create an embedded Excel workbook in Word with cell text | Excel Programming | |||
error excel if embedded in word documents | Excel Programming |