
Originally Posted by
jsherk
I posted this code about 6 years ago, and had completely forgotten about it, so thanks for the thank you!! Glad it worked for you!

Thank you, this post has been very useful to me too. It gave me the basic knowledge about objects and function then I made a few changes :
Sub SaveAsPNG()
Dim oPage As Page
Dim sBaseFileName As String
Dim sPageFileName As String
Dim bViewTwoPageSpread As Boolean
bViewTwoPageSpread = ActiveDocument.ViewTwoPageSpread
ActiveDocument.ViewTwoPageSpread = False
sBaseFileName = ActiveDocument.FullName
sBaseFileName = Left(sBaseFileName, InStrRev(sBaseFileName, ".pub", -1, vbTextCompare) - 1)
For Each oPage In ActiveDocument.Pages
sPageFileName = sBaseFileName & "_Page" & Right("000" & oPage.PageNumber, 3) & ".png"
oPage.SaveAsPicture sPageFileName, pbPictureResolutionCommercialPrint_300dpi
Next oPage
ActiveDocument.ViewTwoPageSpread = bViewTwoPageSpread
End Sub
Every PNG picture is saved in the same folder as the publisher document using the same name adding "_Pagennn.png".