Sub InsertFileName()
Dim sr As New ShapeRange
ActiveDocument.Unit = cdrMillimeter
ActiveLayer.CreateArtisticText(52, 6, Date + 540, , , "Arial", "8").Fill.ApplyUniformFill CreateRegistrationColor()
ActiveDocument.MasterPage.SetSize 210#, 297#
With ActiveDocument.MasterPage
.Orientation = cdrPortrait
.PrintExportBackground = True
.Bleed = 0#
.Background = cdrPageBackgroundNone
End With
sr.AddRange ActivePage.Shapes.All
sr.Group
sr.Duplicate 70, 0
sr.Duplicate 70 * 2, 0
sr.RemoveAll
sr.AddRange ActivePage.Shapes.All
sr.Duplicate 0, -sr.SizeHeight
sr.Duplicate 0, -sr.SizeHeight * 2
sr.Duplicate 0, -sr.SizeHeight * 3
sr.Duplicate 0, -sr.SizeHeight * 4
sr.Duplicate 0, -sr.SizeHeight * 5
ActiveDocument.EndCommandGroup
sr.AddRange ActivePage.Shapes.All
sr.Group
ActivePage.Shapes.All.AlignToPageCenter cdrAlignHCenter + cdrAlignVCenter, cdrTextAlignBoundingBox
End Sub