Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.
Sub LoadTable() Dim oFSO As Object, oFile As Object, wd As Word.Application, iRow As Integer, lRow As Long Dim wsSIN As Worksheet Dim sVal '==================VERY IMPORTANT!!============= 'set a reference to MS Word Object Library in Tools > Reference. Then check "Microsoft Word 14 Object Library '=============================================== ScreenUpdating = False Set wd = CreateObject("word.Application") Set oFSO = CreateObject("Scripting.FileSystemObject") Set wsSIN = Sheets("SIN Table") lRow = wsSIN.Range("A" & Rows.Count).End(xlUp).Row 'gets the row index of the last SIN number in Column A 'lRow = wsSIN.[A1].CurrentRegion.Rows.Count + 1 '******* put the path to your folder in the GetFolder argument ******* For Each oFile In oFSO.GetFolder("C:\ExcelTest").Files With wd.Documents.Open(oFile.Path) For iRow = 1 To .Tables(1).Rows.Count sVal = .Tables(1).Cell(iRow, 3) ' The "3" here specifies the column to get info from wsSIN.Cells(lRow, "A").Value = Left(sVal, Len(sVal) - 2) ' "A" specifies the column info from column 3 is written to wsSIN.Cells(lRow, "D").Value = oFile.Name ' "D" specifies the column the filenames are written to lRow = lRow + 1 Next .Close End With Next Set wsSIN = Nothing Set oFSO = Nothing Set wd = Nothing ScreenUpdating = True End Sub
|Microsoft Access Table name||3||20|
|EXCEL: Parse a formatted address out of a JSON Response into a new field||11||22|
|Array formula error cannot see mistake||9||22|
|Ensuring all processes are complete before continuing||6||0|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
19 Experts available now in Live!