View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Charalampos Charalampos is offline
external usenet poster
 
Posts: 2
Default getting data from word into excel

Try this (with TextFrame)

Sub DonneesWordVersExcel()

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

ThisWorkbook.Activate

ActiveSheet.Shapes("Text Box 16").TextFrame.Characters.Text = myTxt
Cells(16, 2).Select
'ThisWorkbook.Worksheets("Sheet1").Paste

AppWord.Application.Quit

End Sub