How can I disable printing an excel workbook EXCEPT when using a Print-to-PDF macro button?
<p>I searched the site and could not find an answer for this.</p>

<p>Background: I have this Macro as a button on a worksheet. It works well for what I need:</p>

<pre><code>Sub FactSheetSaveToPDF()

ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\" &amp; Range("b2") &amp; " - " &amp; Month(Date) &amp; "." &amp; Day(Date) &amp; "." &amp;     Year(Date) &amp; "." _
      &amp; Hour(Time) &amp; Minute(Time) &amp; Second(Time) &amp; ".pdf",     Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=True
End Sub
</code></pre>

<p>What I need to do now is make it so that a user can ONLY print using these buttons, for compliance reasons. So, whether normal printing is disabled, blocked, whatever, a user of this excel document should only be able to print a worksheet if they hit the button to print to PDF. There cannot be an ability for someone to print outside of this macro button. CTRL+P, file-print, all not allowed.</p>

<p>I saw one answer that disabled all printing, including from the macro. This will not work. The Print-to-PDF macro button needs to work.</p>

<p>I saw another answer that disabled all printing from all excels that the user may have open; this is too much power for one man. I only want to disable printing from this particular excel document. </p>

<p>I assume I will have to create some code that disables all printing, and then amend the macro for the print button to be an exception, or some variation of that. </p>

<p>If you haven't noticed by my vernacular, I am a beginner, if that, at VBA. Trying to keep it as simple as possible. I greatly appreciate any help.</p>