Quote:
Originally Posted by jmltinc
The report must be created by VBA (no Macro) and insert a Footer on each page.
|
Macros and VBA are the same thing...
Try:
Code:
Sub Demo()
Dim Tbl As Table
With ActiveDocument
Set Tbl = .Tables.Add(Range:=.Sections(1).Footers(wdHeaderFooterPrimary).Range, NumRows:=1, NumColumns:=3)
With Tbl
.Cell(1, 1).Range.Text = "QMF 24 Rev D"
With .Cell(1, 2).Range
.Text = "Page of "
.Fields.Add .Characters(6), wdFieldPage
.Fields.Add .Characters.Last.Previous, wdFieldNumPages
End With
.Cell(1, 3).Range.Text = "PRM 05/Section 4.6"
End With
End With
End Sub