The PublishRange property specifies, through pdfExportRange, a portion of a document to publish PDF. If you chose pdfPageRange, you can set the page range by setting the PDFVBASettings.PageRange property.
Examples:
The following VBA example publishes the first three pages of the active document to PDF.
Sub Test()
With ActiveDocument.PDFSettings
.PublishRange = pdfPageRange
.PageRange = "1-3"
End With
ActiveDocument.PublishToPDF "C:\MyDocument.pdf"
End Sub