Page numbering in a word doc footer

Lesley MacMahon

New Member
Hi,

Does anyone know the Progress code to put Page X of Y in a Word Document footer. The saved macro code from Word is :

Sub Macro18()
'
' Macro18 Macro
' Macro recorded 29/06/2004 by C3364
'
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
ActivePane.View.Type = wdOutlineView Then
ActiveWindow.ActivePane.View.Type = wdPrintView
End If
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
If Selection.HeaderFooter.IsHeader = True Then
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter
Else
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
End If
NormalTemplate.AutoTextEntries("Page X of Y").Insert Where:=Selection. _
Range
Selection.TypeText Text:=vbTab & vbTab
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldDate
End Sub


I have worked out how to create the footer but can't convert the code from NormalTemplate.AutoTextEntries... into Progress code. I'm new to using the Com Object Viewer within Progress(v91b). Please help if you can.

/* footer */
chDocument:ActiveWindow:ActivePane:VIEW:seekView = 10.

Regards,
Lesley Macmahon
 
Back
Top