password protecting printing in a protected doc?

A

Armey

I made a post the other day about disabling printing and after
thinking about it a little more, what I really need to do is to
password protect in VBA the printing of a protected document. I am
using MS Word 2003.

I have an open password to protect the template, a password to modify
the template and then the template itself is protected. The way my
application is setup, it basically has no value if the user disables
macros and doesn't use my vba code for the protected document. I need
to password protect printing in the protected document becasue the
information in the protected document is sensitive and my boss would
like to have the added protection of only allowing authorized managers
to print specific reports and not the users.

Any ideas of how to approach this?

Thank you.
 
G

Graham Mayor

What you ask is impossible. Any document you allow someone to see can be
printed, copied and reproduced. You can only make it more difficult for
legitimate users to do so. Those who would abuse the information it contains
will have no such problems.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
O

old man

Hi,

create a sub titled FilePrint and whenever the user prints (through File-->
Print this routine will be invoked:

Public Sub FilePrint()
Dim lretval As Long
Dim resp1 As String
resp1 = InputBox("Print Password", "Printing is restricted on this doc",
" ")
If resp1 = "itsok" Then
lretval = Dialogs(wdDialogFilePrint).Show

End If

End Sub

you also have to trap printing from the print icon so you could do this:
sub FilePrintDefault()
fileprint
endsub

You may think about not allowing the user to select the entire document and
copying to another document.

To get a more secure solution you should consider saving the document as a
PDF (password protected) and disabling printing in the PDF.

old man
 
A

Armey

Hi,

create a sub titled FilePrint and whenever the user prints (through File-->
Print this routine will be invoked:

Public Sub FilePrint()
Dim lretval As Long
Dim resp1 As String
resp1 = InputBox("Print Password", "Printing is restricted on this doc",
" ")
If resp1 = "itsok" Then
lretval = Dialogs(wdDialogFilePrint).Show

End If

End Sub

you also have to trap printing from the print icon so you could do this:
sub FilePrintDefault()
fileprint
endsub

You may think about not allowing the user to select the entire document and
copying to another document.

To get a more secure solution you should consider saving the document as a
PDF (password protected) and disabling printing in the PDF.

old man








- Show quoted text -

Thank you very much. Your ideas and input was very helpful to me! I
appreciate it.
 
G

Graham Mayor

This will not protect the document from being printed, which was your stated
aim. It will only delay anyone who knows anything about Word for about 10
seconds.

PDF is a little more secure, but only a little. It will not stop someone
determined from printing the document.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
O

old man

To achieve real security on a document an organization would have to set up
kiosks that don't allow users to log onto or to print from view-only pdfs. I
have crippled Windows Explorer and other built in features of Windows for
such kiosks. This is probably the closest one can come to preventing
printing. Even that can be defeated if a user takes pictures of each page of
the document.

What the user is asking is how can one, through VBA, make it difficult for
unauthorized users to print the document and that is all the advice this
forum can provide.

old man
 
G

Graham Mayor

What the user is asking for is unrealistic. Sure you can inhibit printing
with vba, but it will not stop anyone printing the document, which the user
says is 'sensitive'. Such methods merely lull the user into a false sense of
security. If the document is sensitive then far more stringent security is
called for.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top