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!
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
Thank you! I will give that a try to see if i can get it to work.
"Jay Freedman" <jay.fr...@verizon.net> wrote in message news:<#3kae67f...@TK2MSFTNGP12.phx.gbl>...
Could you direct me to a good tutorial on MacroButtons... I cannot
seem to find one that will suit this purpose. I have virtually zero
experience with this, but i do have programming experience.
I cannot unlock the fax template to view the macros in their entirety.
I did manage to create an autotext macro where i saw the image (not
text) as an autotext feature as am image in the dialogue box -- but
that is as far as I got.
thank you,
j. gillies
jgil...@cupw-sttp.org (postal_web) wrote in message news:<52b5c5f2.04081...@posting.google.com>...
Could you direct me to a good tutorial on MacroButtons... I cannot
seem to find one that will suit this purpose. I have virtually zero
experience with this, but i do have programming experience.
I cannot unlock the fax template to view the macros in their entirety.
I did manage to create an autotext macro where i saw the image (not
text) as an autotext feature as am image in the dialogue box -- but
that is as far as I got.
thank you,
j. gillies
jgil...@cupw-sttp.org (postal_web) wrote in message news:<52b5c5f2.04081...@posting.google.com>...
Could you direct me to a good tutorial on MacroButtons... I cannot
seem to find one that will suit this purpose. I have virtually zero
experience with this, but i do have programming experience.
I cannot unlock the fax template to view the macros in their entirety.
I did manage to create an autotext macro where i saw the image (not
text) as an autotext feature as am image in the dialogue box -- but
that is as far as I got.
thank you,
j. gillies
"Jay Freedman" <jay.fr...@verizon.net> wrote in message news:<#3kae67f...@TK2MSFTNGP12.phx.gbl>...
Sub CheckIt()
ActiveDocument.AttachedTemplate. _
AutoTextEntries("Checked Box").Insert Where:=Selection.Range
End Sub
Sub UncheckIt()
ActiveDocument.AttachedTemplate. _
AutoTextEntries("Unchecked Box").Insert Where:=Selection.Range
End Sub
(I've added the continuation underscores so I could post them here; each
macro actually contains only one statement.)
The AutoText entry named "Checked Box" consists of a MacroButton field with
this code:
{MACROBUTTON UncheckIt <checked box>}
where the <checked box> is actually a box-with-check character (Wingdings
font, character 254).
Similarly, the AutoText entry named "Unchecked Box" consists of a
MacroButton field with this code:
{MACROBUTTON CheckIt <unchecked box>}
where the <unchecked box> is actually an empty box character (Wingdings
font, character 168).
For your project, create the same kind of system, except with your two
images instead of the checked and unchecked boxes. You could even keep the
names of the macros and AutoText entries the same, since they don't appear
anywhere that would be visible to users, but it might be confusing if the
template needs more work in the future.
Here are a couple of references that might help:
http://word.mvps.org/faqs/tblsfldsfms/UsingMacroButton.htm
http://www.addbalance.com/word/download.htm#CheckboxAddIn
I was unable to unlock the fax template to view the complete VBScript
and macros.
I WAS able to make an autotext macrobutton as described below -- but i
could not get it to do anything.
Is there a good tutorial to which you could point me on Macrobuttons
so that I can learn how to do this. I have programming experience,
just not very much with VBscript.
thanks in advance,
j. gillies
"Jay Freedman" <jay.fr...@verizon.net> wrote in message news:<#3kae67f...@TK2MSFTNGP12.phx.gbl>...
--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
"postal_web" <jgil...@cupw-sttp.org> wrote in message
news:52b5c5f2.0408...@posting.google.com...
The second link you gave me to the tutorial i found to be the best. In
particular the specific instructions to go back and modyfiy the
autotext entry for each. I was having problems because the changes
were being applied to the global VB values and not to the specific
template.
The only difference between the autotext TEXT and the autotext IMAGE
is that the images are a bit slower than text, but it is absolutely
fine. I managed to get them down to about 2k each.
The only thing i have left to do is lock them so that you can only
click them and not delete them.
The best is that it wokrs on our Macs and Windows machines. I had to
modify the template in Mac to get it to align properly.
Thanks again!
j. gillies
"Jay Freedman" <jay.fr...@verizon.net> wrote in message news:<eG$RADIhE...@TK2MSFTNGP11.phx.gbl>...