none
PowerPoint Print Options Dialog RRS feed

  • Question

  • My PP 2016 addin re-purposes the FilePrint button to show a form informing the user that they cannot print the file. This is done with a customUI.xml and works great. However when the user CAN print the presentation, I need to invoke the Print Options Dialog for them to choose a printer. Currently I can only see to call PrintOut() method, which bypasses the Options Dialog.

    What method or strategy do I need to apply to invoke the Print Options Dialog via runtime.

    CustomUI14.xml

    <?

    xmlversion="1.0"encoding="UTF-8"?>

    <

    customUIxmlns="http://schemas.microsoft.com/office/2009/07/customui"onLoad="Ribbon_Load">

        <

    backstageonShow="backstage_show">

        <

    buttonid="PPSaveAs"label="Save As"visible="true"onAction="PowerPointSaveAs"insertAfterMso="TabSave"isDefinitive="true"/>

        <

    buttonid="PPPrint"label="Print"visible="true"onAction="PowerPointPrint"insertAfterMso="TabPrint"isDefinitive="true"/>

        <

    tabidMso="TabSave"visible="false"> </tab>

        <

    tabidMso="TabPrint"visible="false"> </tab>

      </

    backstage>

    </

    customUI>

    CallBack

    public

    voidPowerPointPrint(Office.IRibbonControlcontrol)

            {

               

    DirectoryInfodoc = newDirectoryInfo(_pp.Application.ActivePresentation.FullName);

               

    DirectoryInforep = newDirectoryInfo(Properties.Settings.Default.DocuSharePath);

               

    if(Documents.RepositoryItem.IsFromRepository(doc, rep))

                {

                    Documents.

    RepositoryPrintp = newDocuments.RepositoryPrint(newFileInfo(_pp.Application.ActivePresentation.FullName), Documents.DocumentType.Office_Powerpoint);

                    p.ShowDialog();

                }

               

    else


                {

                    _pp.Application.ActivePresentation.PrintOut();

                }

               

            }

    Any advice is appreciated.

    Greg

    Tuesday, January 5, 2016 3:26 PM

Answers

  • Hi Greg,

    There isn’t the property or method to show the print dialog in Presentation object, it uses PrintOptions object to represent print options.

    You could build a custom form to let user to change the setting, then apply the setting in the code and print.

    Regards

    Starain


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, January 6, 2016 7:36 AM
    Moderator