Showing posts with label Word To Excel. Show all posts
Showing posts with label Word To Excel. Show all posts

Sunday, July 24, 2011

Copy Data from Word to Excel By VBA




Sub CopyTextFromWord()
    Dim wApp As Word.Application
    Set wApp = New Word.Application
    wApp.Visible = True
    wApp.Activate
    wApp.Documents.Open "YourFilePath\SampleWord.docx"
    wApp.Selection.WholeStory
    wApp.Selection.Copy
    Range("A1").Activate
    ActiveSheet.Paste
End Sub