The problem, Can we print document with security? Like a password when we print document?
Microsoft word can't do it. There aren't tools to do it. So we must configure it with Visual Basic Editor (VBE). It is a adding tools in Microsoft Word with Basic Language. If we are familiar with Basic, so we will be easy to create in VBE Microsoft Word.
In this article, we will make a program (source code), when we click File Print (Ctrl + P) the dialog like it :
the project.
'-------------------------------------
Sub FilePrint()
Dim txtPass
Dim txtMasuk
txtMasuk = "Sutrisno"
txtPass = InputBox("Input the Password", "Security Options")
If txtPass = "" Then Exit Sub
If txtPass = txtMasuk Then
Dialogs(wdDialogFilePrint).Show
Else
MsgBox "Wrong Password", vbCritical, "Confirmation !!!"
End If
End Sub
-------------------------------------
After copying or writing the source code above, we will look the dialogs like the picture behind. And don't forget, click File =>Save to save this session. This article is too publishing in Indonesian Edition. Thanks.. And Good Luck![]()
Tidak ada komentar:
Posting Komentar