Consulting

Results 1 to 8 of 8

Thread: Help required to extract data in Word doc to Excel

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    snb
    Guest
    Well, that is a horrible Table in Word.


    Use this macro in Excel while your Word document is open:

    Sub M_snb()
      GetObject(, "Word.application").activedocument.tables(1).Range.Copy
       
      With Sheet2
        .Paste .Cells(1)
      
        GetObject(, "Word.application").activedocument.tables(2).Range.Copy
        .Paste .Cells(24, 1)
        
        .Cells.UnMerge
        .Range("A1, A5, A11:A14,A24:A25,A32").EntireRow.Delete
        .UsedRange.SpecialCells(4).Delete -4159
        .Rows("9:16").Insert
        .Range("C1:D8").Cut .Cells(9, 1)
        .Columns.AutoFit
     End With
    End Sub
    Last edited by snb; 11-29-2019 at 08:51 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •