Disable printing

Hi,

How would I go about disabling printing of documents except for 4 specific users?

Any help in the right direction will be appreciated.]

Thanks

Subject: Disable printing

If you add a hidden text field, $KeepPrivate, and set it by defuault to “1”, the printing and copying of the document will be disabled.

I needed to do this in some databases. So I created a role, “Print”. I then created a shared action for printing, listed in all database views but only visible to those with the aforementioned role. The action looks like this:

@If(!@IsAvailable(Form);@Return(@Prompt([Ok];“Incorrect”;“You must first select a document to print.”));“”);

@Command([ToolsRunMacro];“(OpenPrint)”);

@PostedCommand([OpenDocument]);

@PostedCommand([FilePrint]);

@PostedCommand([FileCloseWindow])

And the “(OpenPrint)” hidden agent looks like this:

FIELD $KeepPrivate := “0”;

@Command([FileSave]);

@All

The queryclose event of the form has this code:

@If($KeepPrivate = “0”;@Command([ToolsRunMacro];“(ClosePrint)”);“”)

And the “(ClosePrint)” hidden agent looks like this:

FIELD $KeepPrivate := “1”;

@All;

Both agents are shared, event driven agent list selections that run on all selected documents.