none
Change File - Print to use a macro to print an additional document RRS feed

  • Question

  • In Word 2003 we had a macro that we were able to associate with File - Print and the <Ctrl><P> ways of printing.  This macro would print the current document (an application) and then would print another document (privacy notice) that is located on a network share.  We did this so those printing the applications would not forget to provide the client with the necessary privacy notice.  Since converting to Word 2010 we've lost this ability and I am not finding anything that can help me recreate this functionality.  Is this possible?

    Thank you,

    Jeremy

    Wednesday, December 30, 2015 9:25 PM

Answers

  • Hi Jeremy

    The problem is that the Backstage effectively removed the printing process from the previous FilePrint "trigger" (old WordBasic command).

    You'd need to trap the DocumentBeforePrint event of the Word Application object in order to "trap" when the Print command has been sent to a document.

    How to set up application events is described in the VBA language reference article

    https://msdn.microsoft.com/en-us/library/office/ff821218(v=office.14).aspx

    The alternate approach would be to create a Ribbon XML customization that hides the built-in Print tab of the Backstage and replaces it with one of your own...


    Cindy Meister, Office Developer/Word MVP, <a href="http://blogs.msmvps.com/wordmeister"> my blog</a>

    Thursday, December 31, 2015 7:38 PM
    Moderator

All replies

  • Hi Jeremy,

    There is Document.printOut method that could print specified document. If there are many documents need to be print, you could get specified document from Applicaton.Documents property.

    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.

    Thursday, December 31, 2015 8:00 AM
    Moderator
  • Hi Jeremy

    The problem is that the Backstage effectively removed the printing process from the previous FilePrint "trigger" (old WordBasic command).

    You'd need to trap the DocumentBeforePrint event of the Word Application object in order to "trap" when the Print command has been sent to a document.

    How to set up application events is described in the VBA language reference article

    https://msdn.microsoft.com/en-us/library/office/ff821218(v=office.14).aspx

    The alternate approach would be to create a Ribbon XML customization that hides the built-in Print tab of the Backstage and replaces it with one of your own...


    Cindy Meister, Office Developer/Word MVP, <a href="http://blogs.msmvps.com/wordmeister"> my blog</a>

    Thursday, December 31, 2015 7:38 PM
    Moderator