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 / January 2008

Tip: Looking for answers? Try searching our database.

Making userforms accessible to multiple templates

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
EllenM - 11 Jan 2008 20:19 GMT
Hello

I have a userform under my Normal.dot file which I want to be accessible by
4 other user-defined templates. I envision adding a toobar to each template
which contains a button that links you to the global userform from any
document created from any of the user-defined templates. Is there a way that
this can be done?

Thanks!
Ellen
Shauna Kelly - 13 Jan 2008 11:03 GMT
Hi Ellen

Yes, this can be done. Here is one way:

First, create a new .dot file and move the form and any associated code
out of your normal.dot into this new .dot file. Let's say it's called
"FileA.dot". I suggest that, at this point, you re-name your normal.dot
file to (eg) normal.dot.old and move it out of the User Templates folder
so it does not get in the way of your work.

Second, in your new .dot file (FileA.dot) create a procedure that opens
the form. Let's say this procedure is called "ShowMyForm".

Third, in each of your templates, create a procedure that calls
FileA.ShowMyForm. And, in each template, create a toolbar with a button
that calls the procedure that is in that template.

Finally, put FileA.dot in your Word Startup folder, so Word will load it
whenever you start Word and thus make it available to your templates.

To deploy this, FileA.dot will need to go in users' Word Startup folder,
and the templates in one of the usual template locations.

Post back if you need more details and let us know where you're up to in
the process and what version of Word you're using.

Hope this helps.

Shauna Kelly.  Microsoft MVP.
http://www.shaunakelly.com/word

> Hello
>
[quoted text clipped - 9 lines]
> Thanks!
> Ellen
EllenM - 14 Jan 2008 16:59 GMT
Thanks so much, Shauna.

> Hi Ellen
>
[quoted text clipped - 40 lines]
> > Thanks!
> > Ellen
 
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.