Article ID: 127206
Article Last Modified on 10/10/2006
Sub Print_Notes()
' Get the current selected sheets.
Set MySheets = ActiveWindow.SelectedSheets
' Loop through all sheets that are selected.
For Each PrintSheet in MySheets
PrintSheet.Select
' Get the current setting for Notes in Page Setup.
CurrSet = ActiveSheet.PageSetup.PrintNotes
' Set the notes in Page Setup to True.
ActiveSheet.PageSetup.PrintNotes = True
' Get the number of pages to print without notes.
NumPages = ExecuteExcel4Macro("GET.DOCUMENT(50)")
' Get the number of pages of notes that will print.
NotesPages = ExecuteExcel4Macro("GET.DOCUMENT(51)")
' Print only the notes pages.
If NotesPages > 0 Then
ActiveWindow.SelectedSheets.PrintOut _
From:=NumPages + 1, To:=NumPages + NotesPages
' Reset the notes setting in Page Setup.
ActiveSheet.PageSetup.PrintNotes = CurrSet
End If
Next
' Regroup the sheets.
MySheets.Select
End Sub
For more information about Notes, choose the Search button in Help and
type:
Notes
112221 Printing Cell Notes as Separate Printout
Additional query words: 5.00a 5.00c 7.00a XL7 XL5 seperate XL
Keywords: kbcode kbhowto kbprogramming KB127206