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