word 的vba编程,请帮忙解释一下
Dim i, j, n, indent, tableID, table
tableID = 1
'.Selection.InsertDateTime "h时m分s秒", False, False, wdSimplifiedChinese, wdCalendarWestern
Dim attrLenLimitArray
attrLenLimitArray = Array(16, 4, 1, 3, 13, 50, 30, 20, 1, 3, 7, 2, 20, 30)
For lineNum = 1 To contentDic.Count
If lineNum Mod Line_Num_Per_Page = 1 Then
doc.Tables(tableID).Select
.Selection.Copy
doc.Range(doc.Range.End-1, doc.Range.End-1).Select
''WScript.Echo "select end"
.Selection.InsertBreak wdPageBreak
''WScript.Echo "insert page"
.Selection.Paste
'WScript.Echo "Paste"
'.Selection.InsertFile templatefile, "", False,False,False
'WScript.Echo "Insert File"
Set table=doc.Tables(tableID)
tableID=tableID + 1
table.Cell(2,1).Select
End If
line = contentDic.Item(lineNum)
data = Split(line, ",")
indent = CInt(data(0))
'omit by yujie20060228
'n = 1
'While n < indent
' .Selection.TypeText "."
' n= n+1
'Wend
.Selection.TypeText data(0)
.Selection.MoveRight wdCell
For i = 1 To UBound(data)
data(i) = Left(rptDecodeString(data(i)), attrLenLimitArray(i))
.Selection.TypeText data(i)
.Selection.MoveRight wdCell
Next
Next
最好能写出每句话的意思,然后再写出这段程序的意思。