ragav_in
I'm not going to give you the fish. Look at the following. In it, you will see how to create a new record document and write value to it. You will need to figure out your loop through files bit:
Sub check_reviewDateFormat()
Dim oTbl As Table, strCellText As String, strRef As String
Dim lngRow As Long
Dim lngWrong As Long
Dim strPath As String
Dim oDocRecord As Document
Dim oDoc As Document
Set oDoc = ActiveDocument
Set oDocRecord = Documents.Add
Set oTbl = oDoc.Tables(3)
With oTbl
For lngRow = 2 To .Rows.Count
If .Cell(lngRow, 4).Range.Text <> "" Then
strCellText = Trim(fcnGetCellText(.Cell(lngRow, 4)))
End If
strRef = Format(strCellText, "d-MMM-YYYY")
If Not StrComp(strCellText, strRef, 1) = 0 Then
lngWrong = lngWrong + 1
strPath = ActiveDocument.FullName
End If
Next
End With
oDocRecord.Range.InsertAfter strPath & " - " & lngWrong
oDocRecord.Activate
lbl_Exit:
Exit Sub
End Sub
Function fcnGetCellText(ByRef oCell As Word.Cell) As String
'The range.text property includes the end of cell marker character which is a single character consisting of _
ChrW(13) & ChrW(7). It has a length = 2
fcnGetCellText = Left(oCell.Range.Text, Len(oCell.Range.Text) - 2)
lbl_Exit:
Exit Function
End Function