Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need text from embedded Word object
Excel 2003
WinXP VBA References activated: Visual Basic for Applications Microsoft Excel 11.0 Object Library OLE Automation Microsoft Office 11.0 Object Library Microsoft Word 11.0 Object Library The following code successfully transcribes to A1 the text from an embedded Word object, it leaves out characters such as tab and paragraph characters. I need it to transcribe those as well so that paragraphs, for example, actually start a new line in the cell, and original tab spaces carry over as well. Any way to do that? Sub CopyText() Application.ScreenUpdating = False Dim oWord As Word.Document Dim rWordText As Word.Range Dim sText As String Set oWord = ActiveSheet.OLEObjects("Object 1").Object Set rWordText = oWord.Range sText = rWordText Range("a1").Value = sText Application.ScreenUpdating = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Embedded word object | Excel Programming | |||
Printing an embedded Word Object | Excel Programming | |||
Copy text with formatting from an Excel cell into an embedded Word object? | Excel Programming | |||
Extracting text from embedded Word Object | Excel Programming | |||
Reference to an Embedded Word Object | Excel Programming |