A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Advanced MS Word Template Design Question: Image swap



 
 
Thread Tools Display Modes
  #1  
Old August 11th, 2004, 03:51 PM
postal_web
external usenet poster
 
Posts: n/a
Default Advanced MS Word Template Design Question: Image swap

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!
  #2  
Old August 11th, 2004, 05:16 PM
Jay Freedman
external usenet poster
 
Posts: n/a
Default Advanced MS Word Template Design Question: Image swap

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!



  #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!

  #7  
Old August 17th, 2004, 05:29 PM
postal_web
external usenet poster
 
Posts: n/a
Default

Jay,

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" 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!

  #8  
Old August 17th, 2004, 06:36 PM
Jay Freedman
external usenet poster
 
Posts: n/a
Default

If you create a new document based on the Professional Fax template and then
open the VBA editor, you should see these two macros:

Sub CheckIt()
ActiveDocument.AttachedTemplate. _
AutoTextEntries("Checked Box").Insert Whe=Selection.Range
End Sub

Sub UncheckIt()
ActiveDocument.AttachedTemplate. _
AutoTextEntries("Unchecked Box").Insert Whe=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/tblsfldsfm...acroButton.htm
http://www.addbalance.com/word/downl...#CheckboxAddIn

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

postal_web wrote:
Jay,

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" 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!



  #9  
Old August 17th, 2004, 07:45 PM
postal_web
external usenet poster
 
Posts: n/a
Default

Jay,

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" 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!

  #10  
Old August 17th, 2004, 09:34 PM
Suzanne S. Barnhill
external usenet poster
 
Posts: n/a
Default

This is not VBScript; it's VBA. You should be able to open the VBA Editor
using Tools | Macro | Macros: Edit or using Tools | Macro | Visual Basic
Editor (Alt+F11). If the macros in the template are disabled, you need to go
to Tools | Macro | Security, choose the Trusted Sources tab, and make sure
that "Trust all installed templates and add-ins" is checked.

--
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" wrote in message
m...
Jay,

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" 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!


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge Advanced Filter - Word 2002 Peter S Mailmerge 1 August 5th, 2004 12:23 AM
Need help with (1) automatic paragraph numbering; (2) page __ of ____ [email protected] New Users 3 May 10th, 2004 06:47 PM
Save As and changing file names in Word 2000 Gene Goldenfeld New Users 11 May 5th, 2004 04:08 AM
macros lirva New Users 2 April 30th, 2004 07:18 AM
saving all documents at once Cindy New Users 4 April 29th, 2004 09:32 AM


All times are GMT +1. The time now is 07:01 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.