Article ID: 139403
Article Last Modified on 10/11/2006
Sub PrintRoman()
' There is no Visual Basic equivalent for the following
' function call to find the total number of pages that
' will print on the active worksheet.
NumOfPages = ExecuteExcel4Macro("GET.DOCUMENT(50)")
' Loop through all the pages.
For x = 1 To NumOfPages
' Set the center footer to the Pagenumber in Roman.
'
' NOTE: In Microsoft Excel 97 and Microsoft Excel 98, use:
'
' WorksheetFunction.Roman(x)
'
' instead of:
'
' Application.Roman(x)
ActiveSheet.PageSetup.CenterFooter = Application.Roman(x)
' Print out the current page.
ActiveSheet.PrintOut from:=x, to:=x
Next x
' Clear the footer when finished printing.
ActiveSheet.PageSetup.CenterFooter = ""
End Sub
ROMAN
Additional query words: 5.00a 5.00c 7.00a XL98 XL97 XL7 XL5 Roman Page Setup Number Convert XL
Keywords: kbcode kbhowto kbprogramming KB139403