Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2006

Tip: Looking for answers? Try searching our database.

open document or cancel command macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Petie - 24 Nov 2006 02:39 GMT
I need to write a macro for a word document which allows users to insert an
electronic signature (jpeg file).  The problem is this needs to be password
protected.  Can anyone suggest how i might add security, or at least if I
have the jpeg copied into a password protected word document, how I may at
least write a error dialogs if they select "Cancel" or input an incorrect
password?
Jezebel - 24 Nov 2006 03:15 GMT
You can do the password bit by creating a UserForm with a textbox and
OK/Cancel buttons. Set the PasswordChar property of the textbox ("*" is the
convention); use the OK button code to validate the password. You can load
an encryption library (there's one that comes with Windows, and there are
several free open-source libraries) to hash the signature for secure
validation, so you don't have to secure your VBA code also.

An alternative is to create the signature as an AutoText entry in the
template, and password-protect the template itself.

Neither of these methods is particularly secure; but the value of the
security is moot in any case. As soon as you send the document to anyone
you've lost control over the signature graphic. If people can see it, they
can copy it (just as they can scan the signature out of a hard-copy letter).

>I need to write a macro for a word document which allows users to insert an
> electronic signature (jpeg file).  The problem is this needs to be
[quoted text clipped - 3 lines]
> least write a error dialogs if they select "Cancel" or input an incorrect
> password?
Graham Mayor - 24 Nov 2006 05:56 GMT
As Jezebel indicates, there really is no point doing this. Anything you
allow someone to see can be easily reproduced. Adding a password simply adds
complexity to provide only a false sense of security.

Signature

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

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> I need to write a macro for a word document which allows users to
> insert an electronic signature (jpeg file).  The problem is this
> needs to be password protected.  Can anyone suggest how i might add
> security, or at least if I have the jpeg copied into a password
> protected word document, how I may at least write a error dialogs if
> they select "Cancel" or input an incorrect password?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.