Disable Menu Print Icon

SOLVED

I was wondering how it would be possible to disable the print icon so that documents may not be printed in a specific window. I have tried using Call VIREBOUT(CHAINE,E) but it unfortunately doesn't work. Is there a different subprogram that handles icons?

Thanks!

  • 0

    Go to Setup, Destinations, Print codes, find the code that is associated with that window/document and remove it from the list. If a print code is removed from that list, when the user clicks on the Printer icon, Record, the code will no longer show in there.

  • +1
    verified answer

    Hello,

    VanessaQ's answer should work.

    To do what you initially wanted to do (disable with VIREBOUT), use the variable STDBOUT and the letter "I":
    Call VIREBOUT(STDBOUT,"I") From GOBJET

    Because the "supervisor" in $SETBOUT uses STDBOUT to add "E" in the CHAINE variable.

    If you prefer to provide additional information to the user, you can use one of the following actions, too:
     

    $ACTION
    Case ACTION
        When "EXEACT"     : Gosub EXEACT
        When "AV_IMPRIME" : Gosub AV_IMPRIME
    Endcase
    Return
    ####################
    $EXEACT
    Case BOUT
    When "I" : Infbox "Printing Disabled" : OK=0
    Endcase
    Return
    ####################
    # Or
    ####################
    $AV_IMPRIME
      Infbox "Printing Disabled"
      OK=0
    Return