Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
C Wayne
 
Posts: n/a
Default How to prevent user from printing in Excel?

Hi,

Can anyone teach me how to prevent other users from printing in Microsoft
Excel and in Microsoft Word?
So far, I know Adobe Acrobat only can do this.

Thank you!
  #2   Report Post  
dominicb
 
Posts: n/a
Default


Good morning C Wayne

There is no standard way of doing this in Word or Excel, although you
could use VBA to disable the print menu item on Excel opening - which I
wouldn't advise to a novice - and restoring upon closing. I can supply
the code if you wish, but personally would advise against it.

As an aside, you can prevent users from printing from Acrobat, but it's
not that hard to circumvent to an experienced user.

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=378459

  #3   Report Post  
C Wayne
 
Posts: n/a
Default

Good morning DominicB

Thank you for replying.
Could you please supply me the code? I would like to try it out.

Will this code cause all the files open in excel cannot be printed?
Or can we set this code to run only in certain folders or external drive?

This is because I just want to prevent users from printing certain
confidential documents but not prevent them from doing other printings.

Regards.


"dominicb" wrote:


Good morning C Wayne

There is no standard way of doing this in Word or Excel, although you
could use VBA to disable the print menu item on Excel opening - which I
wouldn't advise to a novice - and restoring upon closing. I can supply
the code if you wish, but personally would advise against it.

As an aside, you can prevent users from printing from Acrobat, but it's
not that hard to circumvent to an experienced user.

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=378459


  #4   Report Post  
dominicb
 
Posts: n/a
Default


Hi C Wayne

Slight change of plan to my answer here, because you only want to
prevent some documents being printed, not all. If the print button is
disabled it will be a workbook-wide thing, not just limited to certain
workbooks. The code below will leave the Print option untouched but
when a user tries to print the workbook a message is generated and the
print job aborted.

Private Sub Workbook_BeforePrint(cancel As Boolean)
cancel = True
MsgBox "This page cannot be printed."
End Sub

This code needs to be copied into the ThisWorkbook pane of each
workbook you want to control printing of (to get here press alt + f11
and double click ThisWorkbook in the top left hand pane. this code
will be saved with your file next time you save.

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=378459

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
A user says he can't get my drop down list to work in Excel. Keli Excel Discussion (Misc queries) 1 April 26th 05 08:22 PM
How do I prevent data truncation from access to excel using MS Qu. ktw_jax1 Excel Worksheet Functions 1 March 7th 05 06:09 PM
Printing in Excel dgordon30 New Users to Excel 3 February 15th 05 10:41 PM
Columns in Excel will not allow user to click in them Kim Excel Discussion (Misc queries) 1 December 28th 04 06:37 PM
how would i change default user name all excel files learner Excel Discussion (Misc queries) 1 November 29th 04 10:12 PM


All times are GMT +1. The time now is 10:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"