Не могу разобраться в данном коде, не мог бы кто то описать каждую строчку?
End If
MyFile = MyPath & MyFile
Set wdDoc = wdApp.Documents.Open(MyFile)
With ActiveWorkbook.Sheets("data")
For i = 1 To .Cells(2, .Columns.Count).End(xlToLeft).Column
wdDoc.CustomDocumentProperties(.Cells(1, i).Value).Value = .Cells(Ndoc, i).Value
Next i
End With
End If
MyFile = MyPath & MyFile
Set wdDoc = wdApp.Documents.Open(MyFile)
With ActiveWorkbook.Sheets("data")
For i = 1 To .Cells(2, .Columns.Count).End(xlToLeft).Column
wdDoc.CustomDocumentProperties(.Cells(1, i).Value).Value = .Cells(Ndoc, i).Value
Next i
End With