Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2006

Tip: Looking for answers? Try searching our database.

Advanced MS Word Template Design Question: Version 2

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
lettermail - 10 Nov 2006 13:36 GMT
Greetings!

This project orginally started here just over 2 years ago. I got it to
work, but it was never implemented.

Advanced MS Word Template Design Question: Image swap

http://groups.google.com/group/microsoft.public.word.docmanagement/
browse_thread/thread/c1d0485da7d1c735?hl=en%3Fhl%3Den&fwc=2

(linebreak added manually)

Now we need to move forward on it. There are changes to the way it will
work so iI just wnat to confirm a few things before starting and add
some additional info.

1) To simplify things, we want to create a tool bar of commands.Should
not be a big deal -- we'd be running the macros from the tool bar
instead of double-clicking on objects in the actual document,

2) They macros need to change the state of objects in the document and
also know which state the object is in so that it is the same buttom to
toggle the state change. I think a and b are virutally identical in
terms of functionality, they just do different things.

a) On or Off: i.e. fill in a check box or unfill a check box
b) Hide an object/series of objects or unhide and object/series of
objects (i.e. 3 images in header and footer)

3) I assume that it would be built in a similar way to the previous
thread (above) -- but that the button bar would toggle the state
change. However, this would require me, I assume to NAME the objects so
that I can toggle them from the button bar.

I tried to look at the previous code i created, but since it was so
long ago, I can see the VBA, but not the actual field info to edit it.
I remember that the VBA changed the state of the image, but it also
swaped the field code information so that when clicked again it would
perform the opposite function. Also, I am not a VBA programmer, but I
do have script experience with other languages.

Other Issues:

1) We use some Office 2000, some XP and some 2004 for Mac. It needs to
work on all of them. The locking function was an issue for older
versions -- so we could not lock the macros down.

2) The .DOT does not seem to work when we save it -- i.e. it will not
let us save as a document, it requires to save a s a.DOT.

3) We want to store the templates on a network drive and have people
use them each time to create a new document.

thank you in advance,
jg
Klaus Linke - 30 Nov 2006 17:41 GMT
Hi jg,

For a start, re...
> 2) They macros need to change the state of objects in the document
> and also know which state the object is in so that it is the same buttom
[quoted text clipped - 4 lines]
> b) Hide an object/series of objects or unhide and object/series of
> objects (i.e. 3 images in header and footer)

Ordinary buttons also offer that in the "State" property
(ButtonDown/ButtonUp, just as you see for the built-in buttons like those
for bold, italic...).
The macro that toggles the object state would also toggle the button state.
(...you can also gray them out using "Enabled", if that's needed)

Re...
> Other Issues:
> [...]
> 2) The .DOT does not seem to work when we save it -- i.e. it will not
> let us save as a document, it requires to save a s a.DOT.

If the DOT is supposed to offer functionality to arbitrary documents, you'd
make it a global template (Tools > Templates and Add-ins).
If it only makes sense for certain documents, you'd create a new document
based on that template ("File > New... > Templates on my computer" or
something like that, depending on your version).
You do not open the template itself (which sounds like what you are doing).

Regards,
Klaus

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.