modul:
Dim x As New Class3
Sub Register_Event_Handler()
Set x.appWord = Word.Application
End Sub
Class3:
Public WithEvents appWord As Word.Application
'-----------
Private Sub appWord_DocumentBeforePrint(ByVal Doc As Document, Cancel As Boolean)
MsgBox ("You can't print!"
Cancel = True
End Sub
This code is disabling printing!
Now I nead to be desabled for only some users. Can any1 tell me how can I knew which user is loged on the Windows?
Dim x As New Class3
Sub Register_Event_Handler()
Set x.appWord = Word.Application
End Sub
Class3:
Public WithEvents appWord As Word.Application
'-----------
Private Sub appWord_DocumentBeforePrint(ByVal Doc As Document, Cancel As Boolean)
MsgBox ("You can't print!"
Cancel = True
End Sub
This code is disabling printing!
Now I nead to be desabled for only some users. Can any1 tell me how can I knew which user is loged on the Windows?