Microsoft KB Archive/197695

= PPT2000: Handout Page Numbers Always Start at One =

Article ID: 197695

Article Last Modified on 6/23/2005

-

APPLIES TO


 * Microsoft PowerPoint 2000 Standard Edition

-



This article was previously published under Q197695





SYMPTOMS
When you print handout pages in Microsoft PowerPoint, and you select a range of slides to print (for example, slides 11-20), PowerPoint starts numbering the handout pages from 1, instead of starting at the first handout page in the slide range.



CAUSE
Page numbering is a built-in feature in PowerPoint that cannot be changed.



WORKAROUND
To work around this problem, use either of the following methods.

Method 1: Use Custom Page Numbering
You can use the custom page numbering features in Microsoft Word to print your PowerPoint slides. The following steps require that both Microsoft PowerPoint and Microsoft Word be installed on your system.


 * 1) Inside PowerPoint, click File, point to Send To, and then click Microsoft Word.
 * 2) Select one of the specified page layouts, and then click OK.
 * 3) Print your range of slides from within Microsoft Word.

Method 2: Use a Visual Basic for Applications (VBA) Macro
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.

NOTE: The following macro examples work only in PowerPoint. Visual Basic for Applications macros are not supported by the Microsoft PowerPoint Viewer. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

 On the Tools menu, point to Macro, and then click Visual Basic Editor. On the Insert menu, click Module.  Type the following code in the module: Sub HandoutNumber Dim i As Long Dim lStart As Long Dim lStop As Long Dim lHandoutKind As Long Dim lSlide As Long Dim lSlideEnd As Long Dim ppHandoutKind As PpPrintOutputType Dim vbConfirm As VbMsgBoxResult '  ' Ask the user which slide to start printing handouts from. '  lSlide = InputBox("Start handouts at what slide number?", _         "Starting Slide", "1") '  ' Ask the user which page number to start at. '  lStart = InputBox("Start the page number for handouts at: ", _         "Restart Handout Page Numbers", "1") '  ' Ask the user how many slides per page they want to print. '  lHandoutKind = InputBox("How many slides per handout page?" & _         vbNewLine & "2, 3, 4, 6, 9?", "Handout Type", "4") '  ' Use a case statement to set the handout type and the number of   ' slides per page. If the user types in a number other than 2,3, ' 4,6, or 9, round up to the nearest handout layout size. If the ' number is greater than 9, make it the 9-up layout and set ' the slides per page to 9. '  Select Case lHandoutKind Case 1, 2 ppHandoutKind = ppPrintOutputTwoSlideHandouts lHandoutKind = 2 Case 3 ppHandoutKind = ppPrintOutputThreeSlideHandouts lHandoutKind = 3 Case 4 ppHandoutKind = ppPrintOutputFourSlideHandouts lHandoutKind = 4 Case 5, 6 ppHandoutKind = ppPrintOutputSixSlideHandouts lHandoutKind = 6 Case Else ppHandoutKind = ppPrintOutputNineSlideHandouts lHandoutKind = 9 End Select '  ' Confirm the settings. '  vbConfirm = MsgBox("You have chosen to print " & lHandoutKind & _         "-up handouts, starting at page " & lStart & vbNewLine & _         " and slide number " & lSlide & ".", vbOKCancel) '  ' If the result is OK, print the range. '  If vbConfirm = vbOK Then '  ' Calculate the number of pages that have to be printed. Then, test to  ' make sure that number of pages are correct. The Round function rounds ' to the nearest whole number, therefore if you have 10 slides to print on a  ' 9-up handout, lStop first is set to 1, because 10/9 = 1.1111 rounded ' to 1. ' The MOD operator returns a remainder if there are not enough slides ' to fill a page. If the remainder is less than or equal to one half of  ' the layout size. '     lStop = Round((ActivePresentation.Slides.Count - (lSlide - 1)) _            / lHandoutKind) If Round((ActivePresentation.Slides.Count - (lSlide - 1)) Mod _           lHandoutKind) <= (lHandoutKind / 2) Then lStop = lStop + 1 End If  ' ' From 1 to the number of pages, loop until all the pages are printed. '     For i = 1 To lStop '  ' On the notes master, set the automatic page numbers to False; then ' insert the starting page number that the user wants. Increment the ' page number by one. ' This code assumes that object 4 on the handouts master is the page ' number footer on the handouts master page. '        ActivePresentation.NotesMaster.HeadersFooters.SlideNumber _ .Visible = msoFalse ActivePresentation.HandoutMaster.Shapes(4).TextFrame _ .TextRange.Text = lStart lStart = lStart + 1 '  ' Set the printer options and print the handouts. '        With ActivePresentation.PrintOptions '  ' Set the print range type to a slide range. '           .RangeType = ppPrintSlideRange With .Ranges '  ' Clear any previous ranges that were set. '              .ClearAll '  ' Set the slide range to print based on the number of slides per page. '              lSlideEnd = lSlide + lHandoutKind - 1 '  ' If the starting slide is greater than the number of slides in the ' presentation, set the value equal to that number. ' Perform the same test for lSlideEnd, to make sure the slide range ' does not exceed the number of slides in the presentation. '              If lSlide > ActivePresentation.Slides.Count Then lSlide = ActivePresentation.Slides.Count End If              If lSlideEnd > ActivePresentation.Slides.Count Then lSlideEnd = ActivePresentation.Slides.Count End If              .Add Start:=lSlide, End:=lSlideEnd lSlide = lSlide + lHandoutKind End With '  ' Set number of copies to 1. '           .NumberOfCopies = 1 '  ' Set the page output to the handout layout the user has chosen. '           .OutputType = ppHandoutKind '  ' Set the slide positioning to columns. You can also use ' ppPrintHandoutHorizontalFirst to set the slides in rows. '           .HandoutOrder = ppPrintHandoutVerticalFirst End With '  ' Print the single page by using the chosen settings. '        ActivePresentation.PrintOut Next i  End If   ' ' Reset the handout master page to use automatic page numbers, ' and clear any text from the frame. '  ActivePresentation.HandoutMaster.Shapes(4).TextFrame _ .TextRange.Text = "" ActivePresentation.NotesMaster.HeadersFooters.SlideNumber _ .Visible = msoTrue End Sub 



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Additional query words: 9.00 ppt2k incorrect wrong page printing 2 3 6 9 per format numbering

Keywords: kbbug kbpending KB197695

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.