View Single Post
  #4  
Old August 13th, 2004, 02:38 PM
postal_web
external usenet poster
 
Posts: n/a
Default Advanced MS Word Template Design Question: Image swap

Thanks Jay, I will give it a try.

"Jay Freedman" wrote in message ...
Hi postal,

For the image swap, look at the way the checkboxes work in the Fax templates
that come with Word. There are three parts to this:

- Two AutoText entries in the template. Each consists of a MacroButton field
whose display "text" is either an empty box or a filled box. In your case it
would be an "on" image or an "off" image (the display isn't limited to
characters). Also, each MacroButton calls a macro that inserts the other
AutoText entry.

- Two macros, one that inserts one of the AutoTexts to replace the
Selection.Text (because clicking on a MacroButton field makes that field the
Selection) and one that inserts the other AutoText. In your case, you also
want an AutoNew() and an AutoOpen macro, each of which sets
Options.ButtonFieldClicks = 1 so the user doesn't have to double-click.

- One of the MacroButton fields already in place in the body of the template
to start the cycle.

In Word 2000, or any version earlier than 2003, the only way to lock these
fields against replacement with other stuff is to put them in a protected
section of a form. In that case, the macros that replace the fields need to
do an unprotect-replace-reprotect cycle.

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

postal_web wrote:
I am trying to do an advanced design for a template in MS Word (2000).

Essentially waht i need to do is have a ready-made WORD TEMPLATE for
users to fill in.

So, obviously there will be style sheets and the like... but there is
one important variable that has to be included and it HAS to be done
with an image swap, not text or radio buttons or check boxes.

I need to make a row of clickable (1-click) images -- like on-off
buttons.

Each image has to be either ON or OFF, much like a javacript
rollover/click for the web, but 1-click will swap the OFF image to the
ON image. (The default is all images off.)

Another click will then swap the ON image to the OFF image.

All of this has to be locked down so that the user can only click the
image to turn it on or off and not be able to replace it with another
image etc...

Please assist if you can.

Thanks in advance!