Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I have the following issue: i'd like, from excel, to open a word file, copy the entire content (plain text), and then copy it into a text box in excel. I have written the following code, however nothing happens when I execute it and I can't find what is wrong.. Thanks for your help, Nicolas Public Sub DonnéesWordVersExcel() Dim wdDoc As Word.Document Dim AppWord As Word.Application Set AppWord = New Word.Application AppWord.ShowMe AppWord.Visible = True Set wdDoc = AppWord.Documents.Open("c:\hello.doc", ReadOnly:=False) With AppWord .Selection.WholeStory myTxt = .Selection End With Windows("wordtest.xls").Activate Sheets("Sheet1").Activate ActiveSheet.Shapes("Text Box 16").Select Selection.Characters.Text = myTxt Cells(16, 2).Select 'ThisWorkbook.Worksheets("Sheet1").Paste AppWord.Application.Quit End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Get Data from Word to Excel | Excel Worksheet Functions | |||
Copy excel data (inc. textbox data) into Word | Excel Discussion (Misc queries) | |||
Transfer Excel data into Word, including text box data | Excel Discussion (Misc queries) | |||
I want to convert word column data to excel row data to sort addre | Excel Discussion (Misc queries) | |||
Print labels by using Excel data in a Word mail into word | Excel Discussion (Misc queries) |