PageNumbers.ChapterPageSeparator procedure builder

PageNumbers.ChapterPageSeparator (Word)

Returns or sets the separator character used between the chapter number and the page number.

wdSeparatorColon - A colon, wdSeparatorEmDash - An emphasized dash, wdSeparatorEnDash - A standard dash, wdSeparatorHyphen - A hyphen, wdSeparatorPeriod - A period.

Before you can create page numbers that include chapter numbers, the document headings must have a numbered outline format applied that uses styles from the Bullets and Numbering dialog box. To do this in Visual Basic, use the ApplyListTemplate method.

Dim intLoop As Integer 
Dim hfTemp As HeaderFooter 
For intLoop = 1 To 5 
 With Selection 
 End With 
Next intLoop 
ActiveDocument.Content.Style = wdStyleHeading1 
ActiveDocument.Content.ListFormat.ApplyListTemplate _ 
 ListTemplate:=ListGalleries(wdOutlineNumberGallery) _ 
Set hfTemp = ActiveDocument.Sections(1) _ 
With hfTemp.PageNumbers 
 .Add PageNumberAlignment:=wdAlignPageNumberCenter 
 .NumberStyle = wdPageNumberStyleArabic 
 .IncludeChapterNumber = True 
 .HeadingLevelForChapter = 0 
 .ChapterPageSeparator = wdSeparatorEnDash 
End With