|
快下班了,先给你一个半成品,明天上班了再搞批量打开自动运行保存的
Sub 页眉表格()
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
With ActiveDocument.Sections(1)
a1 = .Headers(wdHeaderFooterPrimary).Range.Tables(1).cell(1, 2)
a2 = Split(a1, Chr(13))(0)
b1 = .Headers(wdHeaderFooterPrimary).Range.Tables(1).cell(2, 3)
b2 = Split(b1, Chr(13))(0)
End With
With ActiveDocument.Tables(1)
c1 = .cell(4, 2)
c2 = Split(c1, Chr(13))(0)
.cell(4, 2).Range = a2 & b2 & c2
End With
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub
|
|