allowing user to insert files and pictures into a form

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

Guest

Hi there.

I'm creating a form for colleagues to use and part of that form requires the
insertion of pictures in some parts and files in another.

Is it possible to do this? I've created the form using the three standard
form fields and so when I lock the form, the user is not able to insert
files/pictures.

Any help is greatly appreciated.

Thanks in advance.

Shane
 
Download the Form_Picture template from http://jay-freedman.info and
examine how it works.

Several people who tried it have written to me for help. They had
trouble because they didn't name the bookmarks properly, or didn't
select the entire macrobutton field before applying a bookmark to it,
or they got their bookmarks overlapping.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
Hi Jay.

Man, that's exactly what I need. I've had a play with your functionality
but being a bit of a intermediate word user I'm not having much luck with it.
Is it possible to explain how to get this little bit of magic working?

Cheers

Shane
 
Actually, there are several bits of magic in there. :-)

Bit 1 is that a macrobutton field is clickable and active even when
it's in the protected text area of a form, and it will launch the
macro that it points to. In this template, that macro is the one named
FormInsertPicture. (Macrobuttons are explained in detail at
http://www.word.mvps.org/FAQs/TblsFldsFms/UsingMacroButton.htm.)

Bit 2 is that the macro can find the name of the bookmark that
contains the macrobutton field. The template has to be constructed so
that each macrobutton is contained by a bookmark whose name is
'PicButton' followed by a number. For example, the first one is named
PicButton1.

The macro takes that number and attaches it to 'PicLocation' -- for
example, PicLocation1. The macro then unprotects the form, shows the
Insert Picture dialog to the user, inserts the chosen picture at the
PicLocation bookmark, resizes the picture, and reprotects the form.
For all that to work properly, there must be a PicLocation bookmark
with the matching number, and it has to be somewhere else in the
template, not inside the PicButton bookmark or overlapping it.

Bit 3 is only a little magic. :-) When the user prints the document,
a macro intercepts the command, changes all the macrobutton text to
white (nonprinting), prints, and changes the text back to Auto.

Bit 4 is very little magic -- the AutoNew and AutoOpen macros make
sure that it takes only one click to activate a macrobutton field.
Normally they take a double-click; but if you try to double-click a
macrobutton in the protected part of the form, it'll jump the cursor
to the next available form field instead.

When you're setting up the macrobuttons and bookmarks, it helps to
turn on nonprinting characters by pressing the ¶ button, and go to
Tools > Options > View to turn on display of bookmarks. An enclosing
PicButton bookmark should look like a pair of thick gray square
brackets on the ends of the macrobutton field. The PicLocation
bookmarks can be collapsed to a single point, which makes the brackets
overlap so they look like an I-beam.

If that isn't enough to get you going, email a copy of your template
to me and I'll check it out.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top