View Single Post
  #6   Report Post  
Leonard
 
Posts: n/a
Default Protected form + InsertPicture

Mr. Jay Freedman, you're a genius!

OK, I just downloaded your latest Form_Picture.dot and I pressed Alt+F11 and
then replaced all occurrences of "MyPassword" with my own password within the
quotes. I then protected the VBA project module against being viewed and
modified. Finally, I password protected the template for forms with my own
password. It worked! No users can now intentionally try to unprotect the
template. Thanks so very much!!


"Jay Freedman" wrote:

Hi Leonard,

If you downloaded the template before this past Sunday, go get a copy of the
latest version. Then look at the code in the VBA editor. Among other things,
I've included the password parameter as a comment in each .Protect and
..Unprotect statement. To use it, remove the single quote that makes it a
comment and put your password between the quotes. (Hmm, now that I think of
it, the password should be a string variable that's used in each of those
places. Give me until tomorrow to do that, because I can't modify the web
site from here.)

If you're worried about users opening the code to see the password, you can
password-protect the code itself. To do this, in the VBA editor, go to Tools
Project Properties Protection. Check the "Lock project" box and enter

the password twice (this can be the same as or different from the password
for the form). Be sure to keep a record of the password or, better, keep a
copy of the template without a code password -- if your only copy is
protected and you lose the password, you're sunk.

However, a user prying into the code to find the form password is more than
just "inadvertent", so maybe you can dispense with the added hassle.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org

Leonard wrote:
Mr. Freedman, you don't know how much I appreciate you creating this
masterpiece of a document that allows inserting a picture while the
other sections of the document are protected against being altered.
I see that the document has to be protected, unprotected and then
protected again. That means there can't be any password applied when
specifying protecting the forms. Is it possible for you to modify
your document somewhat so that a specific password can be applied to
the document and still have the insert picture feature work? The
reason I am asking is because I don't want my users to
"inadvertently" unprotect the entire document. Thank you.

"Jay Freedman" wrote:

On Wed, 9 Nov 2005 04:35:01 -0800, "Richard"
wrote:

GoodDay,

I've created a protected form. I'd like 1 field to be an "insert
image here" type thing. But once the form is protected.. you can
no longer insert an image. I've tried using an InsertImage macro
to no avial. Any Ideas? It is necessary that I prevent users from
altering this form but they must be able to insert a picture. Any
help would be greatly appreciated.

Thanks.
Richard

Download the Form_picture tutorial template from
http://jay-freedman.info and look at the system of macrobuttons,
bookmarks, and macros that make it work. Write to me if you have any
questions about how to apply it to your form.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org