View Single Post
 
Old 04-10-2018, 06:31 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

You are going to have to be clearer what it is that you want to achieve with regard to 'pages'. There are no 'pages' in a Word document. Word is not a page layout application. You could insert five page breaks (see macro), but what would be the point of that?

Code:
Sub Macro1()
Dim i As Integer
Dim strPages As String
    strPages = InputBox("How many pages?", , 5)
    If IsNumeric(strPages) = False Then Exit Sub
    If Not strPages = "" Then
        For i = 1 To Val(strPages)
            Selection.InsertBreak wdPageBreak
        Next i
    End If
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote