BeforeBuild事件中,将这两个标签插入到Marks集合:
Select Case e.Book.TempLate Case "某模板名称" e.Book.Marks.Add("序号",0)
e.Book.Marks.Add("xh", 0)End Select
BuildDetail事件中加入下面的代码:
Select Case e.Book.TempLate Case "某模板名称"
e.Book.Marks("xh") = e.Book.Marks("xh") + 1
e.Book.Marks("序号") = e.Book.Marks("xh")End Select