View Single Post
 
Old 04-06-2016, 09:18 AM
Charles Kenyon Charles Kenyon is offline Windows 8 Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

I have a bit more time now, you do not add pages to a document. You can add page breaks but those are not odd or even. If you are adding something as odd, chances are it is a section break. This is usually not necessary.

The link I gave before is about page numbers. Page numbers are fields, usually placed in a header or footer.

The following macro can be run in a document to make all page numbers consecutive, but if you added odd-page or even-page section breaks, there may be skipped pages. When you print, those skipped pages would print blank.

Code:
Sub ContinuousPageNumbers()
' Jay Freedman
' http://answers.microsoft.com/en-us/office/forum/office_2007-word/page-numbers-are-all-fouled-up-in-my-large/d188687e-9663-43e0-a450-1dbadc47f09f
' modified to add message boxes by Charles Kenyon
'
    Dim secNum As Long
    Dim btnCancel ' give user chance to cancel
    btnCancel = MsgBox(prompt:="Do you want to reset all of the page numbers in this document to number continuously?", _
        Title:="Are you sure?", _
        Buttons:=vbYesNo)
    If btnCancel = vbNo Then
        MsgBox prompt:="Reset of continuous page numbering cancelled by user!", Buttons:=vbExclamation, Title:="Page Number Reset Cancelled!"
        Exit Sub
    End If
'   Proceed with reset
    With ActiveDocument
        For secNum = 2 To .Sections.Count
            .Sections(secNum).Headers(wdHeaderFooterPrimary) _
                 .PageNumbers.RestartNumberingAtSection = False
        Next
    End With
    MsgBox prompt:="The Continuous Page Numbers macro has run.", Title:="Page number reset macro finished!"
End Sub
See Installing Macros if you need help on what to do with this.


What is it you are trying to do?
Reply With Quote