{"id":64363,"date":"2007-07-27T01:03:00","date_gmt":"2007-07-27T01:03:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2007\/07\/27\/how-can-i-configure-powerpoint-to-print-handouts-instead-of-slides\/"},"modified":"2007-07-27T01:03:00","modified_gmt":"2007-07-27T01:03:00","slug":"how-can-i-configure-powerpoint-to-print-handouts-instead-of-slides","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/how-can-i-configure-powerpoint-to-print-handouts-instead-of-slides\/","title":{"rendered":"How Can I Configure PowerPoint to Print Handouts Instead of Slides?"},"content":{"rendered":"<p><IMG class=\"nearGraphic\" title=\"Hey, Scripting Guy! Question\" height=\"34\" alt=\"Hey, Scripting Guy! Question\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\" width=\"34\" align=\"left\" border=\"0\"> \n<P>Hey, Scripting Guy! How can I configure the print options in PowerPoint so that, by default, handouts are printed rather than slides?<BR><BR>&#8212; OG <\/P><IMG height=\"5\" alt=\"Spacer\" src=\"https:\/\/devblogs.microsoft.com\/scripting\/wp-content\/uploads\/sites\/29\/2019\/05\/spacer.gif\" width=\"5\" border=\"0\"><IMG class=\"nearGraphic\" title=\"Hey, Scripting Guy! Answer\" height=\"34\" alt=\"Hey, Scripting Guy! Answer\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" width=\"34\" align=\"left\" border=\"0\"><A href=\"http:\/\/go.microsoft.com\/fwlink\/?linkid=68779&amp;clcid=0x409\"><IMG class=\"farGraphic\" title=\"Script Center\" height=\"288\" alt=\"Script Center\" src=\"http:\/\/img.microsoft.com\/library\/media\/1033\/technet\/images\/scriptcenter\/ad.jpg\" width=\"120\" align=\"right\" border=\"0\"><\/A> \n<P>Hey, OG. You know, whoever said \u201cLightning never strikes twice in the same place\u201d didn\u2019t reckon on the Scripting Guys, did they? After all, less than a year after <A href=\"http:\/\/www.microsoft.com\/technet\/scriptcenter\/resources\/qanda\/oct06\/hey1002.mspx\"><B>winning the Spanish lottery<\/B><\/A> the Scripting Guys have done it again: this time, we\u2019ve won $1 million in the MS-WORD LOTTO LOTTERY! <\/P>\n<P>Thank you; we appreciate that. To tell you the truth, we\u2019re pretty excited about this, too; after all, $1 million is almost as much money as the Scripting Guy who writes this column makes in a year. To get a whole bunch of money for doing absolutely nothing? That\u2019s \u2013 well, OK, that\u2019s a reasonably good description of his regular job. But getting a $1 million bonus on top of that is pretty darn nice.<\/P>\n<P>Now, we know what you\u2019re thinking: you\u2019re thinking that this might be some kind of scam or something. That hardly seems possible, however; after all, the email <I>did<\/I> come from \u201cMicrosoft Worldwide Cooperation.\u201d (Which, interestingly enough, marks the first time the words \u201cMicrosoft\u201d and \u201ccooperation\u201d have ever occurred in the same sentence.) As if that wasn\u2019t enough, the email includes a security code \u2013 MSW\/JUN\/SS06 \u2013 specifically designed to \u201cprevent scam.\u201d Oh, and this: we claim our prize not by contacting some shady, fly-by-night operation in Africa, but by directly contacting <A href=\"http:\/\/en.wikipedia.org\/wiki\/Sir_Terry_Wogan\" target=\"_blank\"><B>Sir Terry Woggan<\/B><\/A> of London, England. (Who, oddly enough, is misidentified in the email as the UK\u2019s Foreign Minister. As everyone knows, Sir Terry is really a radio personality and a commentator for the Eurovision Song Contest. Which makes him <I>way<\/I> more important than the Foreign Minister.)<\/P>\n<P>Anyway, now being flush with money as well as success, the Scripting Guys are feeling pretty good; in fact, we\u2019d like to share some of our newfound fortune with all of you. By giving away some, or even all, of our $1 million windfall? Heck no; where would you get an idea like that? We have something much more valuable to share with everyone; we have a script that can change the print options in PowerPoint, configuring things so that, by default, handouts (three per page) are printed rather than slides:<\/P><PRE class=\"codeSample\">Const ppPrintOutputThreeSlideHandouts = 3<\/p>\n<p>Set objPPT = CreateObject(&#8220;PowerPoint.Application&#8221;)\nobjPPT.Visible = True<\/p>\n<p>Set objPresentation = objPPT.Presentations.Add\nSet objSlide = objPresentation.Slides.Add(1,1)<\/p>\n<p>Set objOptions = objPresentation.PrintOptions\nobjOptions.OutputType = ppPrintOutputThreeSlideHandouts\n<\/PRE>\n<P>To paraphrase the commercial, \u201cConfiguring print options in PowerPoint? Priceless.\u201d<\/P>\n<P>As you can see, we start things out by defining a constant (with the delightful name ppPrintOutputThreeSlideHandouts) and assigning it the value 3; we\u2019ll use this constant to tell PowerPoint which print option we\u2019d like to set as the default. That leads to an obvious question: are there <I>other<\/I> values we could assign as the default print option? Of course there are; in fact, here\u2019s a list of constants and their associated values:<\/P>\n<TABLE class=\"dataTable\" id=\"EZD\" cellSpacing=\"0\" cellPadding=\"0\">\n<THEAD><\/THEAD>\n<TBODY>\n<TR class=\"record\" vAlign=\"top\">\n<TD class=\"\">\n<P class=\"lastInCell\"><B>Constant<\/B><\/P><\/TD>\n<TD class=\"\">\n<P class=\"lastInCell\"><B>Value<\/B><\/P><\/TD><\/TR>\n<TR class=\"evenRecord\" vAlign=\"top\">\n<TD class=\"\">\n<P class=\"lastInCell\">ppPrintOutputBuildSlides<\/P><\/TD>\n<TD class=\"\">\n<P class=\"lastInCell\">7<\/P><\/TD><\/TR>\n<TR class=\"record\" vAlign=\"top\">\n<TD class=\"\">\n<P class=\"lastInCell\">ppPrintOutputFourSlideHandouts<\/P><\/TD>\n<TD class=\"\">\n<P class=\"lastInCell\">8<\/P><\/TD><\/TR>\n<TR class=\"evenRecord\" vAlign=\"top\">\n<TD class=\"\">\n<P class=\"lastInCell\">ppPrintOutputNineSlideHandouts<\/P><\/TD>\n<TD class=\"\">\n<P class=\"lastInCell\">9<\/P><\/TD><\/TR>\n<TR class=\"record\" vAlign=\"top\">\n<TD class=\"\">\n<P class=\"lastInCell\">ppPrintOutputNotesPages<\/P><\/TD>\n<TD class=\"\">\n<P class=\"lastInCell\">5<\/P><\/TD><\/TR>\n<TR class=\"evenRecord\" vAlign=\"top\">\n<TD class=\"\">\n<P class=\"lastInCell\">ppPrintOutputOneSlideHandouts<\/P><\/TD>\n<TD class=\"\">\n<P class=\"lastInCell\">10<\/P><\/TD><\/TR>\n<TR class=\"record\" vAlign=\"top\">\n<TD class=\"\">\n<P class=\"lastInCell\">ppPrintOutputOutline<\/P><\/TD>\n<TD class=\"\">\n<P class=\"lastInCell\">6<\/P><\/TD><\/TR>\n<TR class=\"evenRecord\" vAlign=\"top\">\n<TD class=\"\">\n<P class=\"lastInCell\">ppPrintOutputSixSlideHandouts<\/P><\/TD>\n<TD class=\"\">\n<P class=\"lastInCell\">4<\/P><\/TD><\/TR>\n<TR class=\"record\" vAlign=\"top\">\n<TD class=\"\">\n<P class=\"lastInCell\">ppPrintOutputSlides<\/P><\/TD>\n<TD class=\"\">\n<P class=\"lastInCell\">1<\/P><\/TD><\/TR>\n<TR class=\"evenRecord\" vAlign=\"top\">\n<TD class=\"\">\n<P class=\"lastInCell\">ppPrintOutputThreeSlideHandouts<\/P><\/TD>\n<TD class=\"\">\n<P class=\"lastInCell\">3<\/P><\/TD><\/TR>\n<TR class=\"record\" vAlign=\"top\">\n<TD class=\"\">\n<P class=\"lastInCell\">ppPrintOutputTwoSlideHandout<\/P><\/TD>\n<TD class=\"\">\n<P class=\"lastInCell\">2<\/P><\/TD><\/TR><\/TBODY><\/TABLE>\n<DIV class=\"dataTableBottomMargin\"><\/DIV>\n<P>After we define the constant we next create an instance of the <B>PowerPoint.Application<\/B> object and then set the <B>Visible<\/B> property to True; that gives us a running instance of PowerPoint that we can see on screen. How exactly <I>do<\/I> we create an instance of the PowerPoint.Application object and set the Visible property to True? Why, by running these two lines of code, of course:<\/P><PRE class=\"codeSample\">Set objPPT = CreateObject(&#8220;PowerPoint.Application&#8221;)\nobjPPT.Visible = True\n<\/PRE>\n<P>In order to change the print options we need a PowerPoint presentation; that\u2019s because the print options are tied to a specific presentation rather than being global options tied to PowerPoint itself. Hence the next two lines of code, in which we create a new presentation (using the default template) and then add a single slide to that presentation:<\/P><PRE class=\"codeSample\">Set objPresentation = objPPT.Presentations.Add\nSet objSlide = objPresentation.Slides.Add(1,1)\n<\/PRE>\n<P>Of course, you don\u2019t <I>have<\/I> to create a new presentation. Alternatively, you can open an existing presentation and change the print options for <I>that<\/I> presentation. For example, here\u2019s a script that opens the file C:\\Scripts\\Test.ppt and modifies the print options:<\/P><PRE class=\"codeSample\">Const ppPrintOutputThreeSlideHandouts = 3<\/p>\n<p>Set objPPT = CreateObject(&#8220;PowerPoint.Application&#8221;)\nobjPPT.Visible = True<\/p>\n<p>Set objPresentation = objPPT.Presentations.Open(&#8220;C:\\Scripts\\Test.ppt&#8221;)<\/p>\n<p>Set objOptions = objPresentation.PrintOptions\nobjOptions.OutputType = ppPrintOutputThreeSlideHandouts\n<\/PRE>\n<P>Speaking of modifying print options, that\u2019s what we do next; we create a reference to the <B>PrintOptions<\/B> object, then assign the constant ppPrintOutputThreeSlideHandouts to the <B>OutputType<\/B> property:<\/P><PRE class=\"codeSample\">Set objOptions = objPresentation.PrintOptions\nobjOptions.OutputType = ppPrintOutputThreeSlideHandouts\n<\/PRE>\n<P>That\u2019s all we have to do; if we now click the <B>Print<\/B> button or programmatically call the <B>PrintOut<\/B> method we\u2019ll end up with handouts (three per page) rather than slides. Which is exactly what we wanted to end up with.<\/P>\n<TABLE class=\"dataTable\" id=\"EDH\" cellSpacing=\"0\" cellPadding=\"0\">\n<THEAD><\/THEAD>\n<TBODY>\n<TR class=\"record\" vAlign=\"top\">\n<TD class=\"\">\n<P class=\"lastInCell\"><B>Note<\/B>. Are there other print options you can configure besides OutputType? You bet there are; see the <A href=\"http:\/\/msdn2.microsoft.com\/en-us\/library\/aa221243(office.11).aspx\" target=\"_blank\"><B>Microsoft PowerPoint VBA Language Reference<\/B><\/A> for details.<\/P><\/TD><\/TR><\/TBODY><\/TABLE>\n<DIV class=\"dataTableBottomMargin\"><\/DIV>\n<P>Anyway, we hope that answers your question, OG. As for the Scripting Guys, once the initial excitement over winning the MS-WORD LOTTO LOTTERY began to fade we started to have second thoughts about this whole thing. After all, Microsoft, of all people, giving money <I>away<\/I>? Hmmm \u2026.<\/P><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hey, Scripting Guy! How can I configure the print options in PowerPoint so that, by default, handouts are printed rather than slides?&#8212; OG Hey, OG. You know, whoever said \u201cLightning never strikes twice in the same place\u201d didn\u2019t reckon on the Scripting Guys, did they? After all, less than a year after winning the Spanish [&hellip;]<\/p>\n","protected":false},"author":595,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[129,49,3,5],"class_list":["post-64363","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-microsoft-powerpoint","tag-office","tag-scripting-guy","tag-vbscript"],"acf":[],"blog_post_summary":"<p>Hey, Scripting Guy! How can I configure the print options in PowerPoint so that, by default, handouts are printed rather than slides?&#8212; OG Hey, OG. You know, whoever said \u201cLightning never strikes twice in the same place\u201d didn\u2019t reckon on the Scripting Guys, did they? After all, less than a year after winning the Spanish [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/64363","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/595"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=64363"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/64363\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=64363"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=64363"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=64363"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}