PDA

View Full Version : Custom buttons in the print preview.



Artik
12-20-2019, 04:18 AM
Is it possible for buttons added to PrinPreview Tab to work?

My XML code:

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" >
<ribbon >
<tabs >
<tab idMso="TabPrintPreview" >
<group
id="rxgrp_Send"
label="My New Group">
<button
id="rxbtn_Send1"
imageMso="ArrangeByTo"
label="Button 1"
size="large"
onAction="rxbtn_Send1_onAction"/>
<button
id="rxbtn_Send2"
imageMso="NewOutlookDataFile"
label="Button 2"
size="large"
onAction="rxbtn_Send2_onAction"/>
</group >
</tab >
</tabs >
</ribbon >
</customUI >

The buttons on the Tab are created, but they do not work.
I have some concerns that it might be impossible to do.

In the attachment I showed an example.

Artik

Paul_Hossler
12-21-2019, 12:33 PM
Hmmm - I'm guessing that the PrintPreview screen display is special somehow and blocks everything else, emphasis on the 'guess'

Artik
12-21-2019, 02:50 PM
Leaving aside the issue of ribbon, if your procedure provides for programmatically displaying the print preview and then any other actions, then the code execution is suspended while the preview window is displayed. Will move on only after the window is closed. That is why I expressed my concerns that this task may not be feasible from within Excel. This would probably be possible from the COM add-on level. But COM is not my garden. :winking2:
At least I would ask you to confirm that the task cannot be solved from within Excel.

Artik

Paul_Hossler
12-22-2019, 09:36 AM
At least I would ask you to confirm that the task cannot be solved from within Excel.

This is not the same as saying Excel can't do it, but I couldn't get it to work. The Ribbon button handler never even seems to fire


I put a breakpoint there

I added a "Stop"

I added a "Beep

I used .Statusbar = ...


Nothing seems to happen