This forum is in archive mode. You will not be able to post new content.

Author Topic: Copying specific data from a word doc to excel  (Read 4005 times)

0 Members and 1 Guest are viewing this topic.

Offline pyte

  • Peasant
  • *
  • Posts: 79
  • Cookies: -7
    • View Profile
Copying specific data from a word doc to excel
« on: December 13, 2012, 03:58:57 AM »

Trying to automate a CV selection process so im trying to fetch data from a word   document targeting specific qualifications and experience.
below is a VBA code that doesn't quite deliver...

Code: [Select]
Sub Test()
    Const wdFileName As String = "C:\Users\Desktop\emailexpottest.doc"
    Dim wdApp As Object
    Dim wdDoc As Object
    Dim Sh As Worksheet
    Set wdApp = CreateObject("Word.Application")
    Set wdDoc = wdApp.Documents.Open(test1)
    Set Sh = Worksheets("Sheet1")
    Sh.Activate
    Sh.Range("A1").Select
    wdDoc.Tables(1).Select
    wdApp.Selection.Copy
    ActiveSheet.Paste Link:=True
    wdApp.Quit
End Sub


Kindly advice on what amendments to make.
If you don't go into the tiger's cave, how will you get the cub?

 



Want to be here? Contact Ande, Factionwars or Kulverstukas on the forum or at IRC.