macrobuttons and protected document

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello
I am trying to create a form that has "text form field" and "check box form
field". In order to use these the document must me protected. I also want
to be able to paste pictures in the document while it is protected. I
created a macrobutton {MACROBUTTON EditPaste Add Photo}. This macro works
but when I protect the document I cannot get both the form fields and the
macro to work while protecting all the other text. Can someone please help,
Thanks, saland1
 
Have you put your MacroButton fields in an unprotected section of the
document?

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
When I prtoctect the form I cannot get {MACROBUTTON EditPaste Add Photo} to
work. Is there any thing else that needs to be added to this so it will work
with the document protected?
Thanks for the reply.
 
The EditPaste command is not going to work in the protected portion of a
document.

You will need a macro that:
1) Unprotects the document.
2) Finds the loction for pasting.
3) Pastes your photo.
4) Reprotects the document without resetting form fields, and
5) Moves the selection point to the next logical form field.

I suspect you would want something to first check on whether what is being
pasted is a photo, as well.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
Hi saland1,

My apologies -- I completely overlooked the content of the macrobutton field
and the intention to insert a picture. I have a demo template that shows how
to do what you're trying to do, and Charles is exactly right about the macro
and what it needs to do. You can download the template from
http://jay-freedman.info/form_picture.zip.
 
Thanks for the information. I am wanting to paste a part of a pic into a
form (Home Inspection Form), not wanting to insert the whole pic, but just a
part of it that shows the problem I am talking about in the form. I would
like to have a small dot or something on the form that when I click on it it
would paste a part of the pic that I have copied from paint. Not sure if it
can be done, as you can tell I know very little about macros and scripts.
Thanks for your time,
Saland1
 
In the demo template, if you want to, you can replace the text "Click
here to insert photo" with a single character, such as a dot or square
block from the Insert > Symbol dialog (select the Wingdings font).

Pasting just part of a picture is beyond what can be done here. If you
weren't working in a protected document, you could use Word's crop
tool on the Picture toolbar to select the piece you want, but I
wouldn't want to try to work that into a macro. Instead, do the
cropping in Paint and save the part you want as a separate file. Then
use the form in Word to bring in the already cropped picture.
 
Thanks for the info, could I unprotect a certain are on the form to allow
EditPaste to work while rest of the form it protected?
Thanks, saland1
 
Yes, you can do that, but you may not like some of the side-effects.

To do it, put the cursor at the beginning of the part you want to leave
unprotected, go to Insert > Break, and select a continuous section break.
Then move the cursor to the beginning of the next part that should be
protected, and insert another continuous section break. (If the unprotected
part is at the end of the document, you don't need the second break.)

Now go to Tools > Protect Document, select Forms protection, and click the
Sections button. (In Word 2002/2003, this is on a task pane, and the
Sections thing is a link instead of a button.) Uncheck the section that
should stay unprotected.

The side-effects:

- The unprotected section goes all the way across the page. You can't have
protected and unprotected areas side by side.

- Section breaks can't be inserted in the middle of a table or inside text
boxes.

- When you tab out of the last form field in the preceding protected
section, the cursor lands at the beginning of the unprotected section. If
you have another protected section after that, you can't tab into its first
form field -- you have to use the mouse.

- Some things don't work in a protected document, even in an unprotected
section. You'll find a number of menu items are grayed out.
 
Back
Top