Add-InTemplates

J

jerem

Can you make Add-In Templates editable? I experience problems with my
computer at work quite often and every time an IT person tries to solve the
problem they invariably blame all the macros I have in my Normal.dot. So in
order to appease them (although I don't think the macros I use have anything
to do with the weird problems I have) I removed them and put them in their
own .dot template. Even with doing this, I am still experiencing odd things
like Closing and choosing Save and the document saves but doesn't close and
the problem of not being able to generate a TOC w/o getting |MSPN| codes in
my document.

Odd things aside, once I put these macros in an Add-In they are no longer
editable (it locks you out from accessing the code) -- and I'm still having
the problems described above. When they were in my Normal.dot I could go in
and change macros as needed (and I did this quite often). Now I have to save
this .dot file locally and then move it into my template folder, delete the
Normal that's there, rename my .dot file Normal in order to get access to the
code. I'm figuring there's got to be a better way than this?????
 
J

Jay Freedman

I can't begin to address your "odd things" without seeing the code,
and maybe not even then. But to answer your main question, the way to
make the macros in an add-in template editable is to open the template
itself as you would open a document, by going to File > Open and then
navigating to the Startup folder.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
F

Fumei2 via OfficeKB.com

More to the point...

"Now I have to save this .dot file locally and then move it into my template
folder, delete the Normal that's there, rename my .dot file Normal in order
to get access to the code. I'm figuring there's got to be a better way than
this?????"

Do not do this. Do NOT rename the file Normal.dot.

1. You can name it anything you want. MyCode.dot, macros.dot...whatever.

2. It does NOT have to be your Templates folder. It can be anywhere.

3. To load it on Startup, put it in your Startup folder. Once Word starts,
ALL procedures (macros) in the .DOT file will be accessible. No you will NOT
be able to edit them the same way you can always edit normal.dot code. As
has been stated, you will have to actually open the .dot file.

4. You can load it (or unload it) dynamically. Either manually using menus
(Templates and Add-ins), or progammatically.

Jay said:
I can't begin to address your "odd things" without seeing the code,
and maybe not even then. But to answer your main question, the way to
make the macros in an add-in template editable is to open the template
itself as you would open a document, by going to File > Open and then
navigating to the Startup folder.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
Can you make Add-In Templates editable? I experience problems with my
computer at work quite often and every time an IT person tries to solve the
[quoted text clipped - 13 lines]
Normal that's there, rename my .dot file Normal in order to get access to the
code. I'm figuring there's got to be a better way than this?????
 
F

Fumei2 via OfficeKB.com

Just as a further comment, I prefer to not have my add-ins in Startup. I
have a wee add-in in my Startup, but only does one thing. It puts a button
on a toolbar. That button loads/unloads the REAL add-in - the one with lots
and lots of procedures. That add-in is on a network drive.

That way if something happens locally, and my Startup gets trashed (the IT
people blindly reimaging the computer for example) the wee Startup add-in is
easily replaced, and my main code container is safe.
More to the point...

"Now I have to save this .dot file locally and then move it into my template
folder, delete the Normal that's there, rename my .dot file Normal in order
to get access to the code. I'm figuring there's got to be a better way than
this?????"

Do not do this. Do NOT rename the file Normal.dot.

1. You can name it anything you want. MyCode.dot, macros.dot...whatever.

2. It does NOT have to be your Templates folder. It can be anywhere.

3. To load it on Startup, put it in your Startup folder. Once Word starts,
ALL procedures (macros) in the .DOT file will be accessible. No you will NOT
be able to edit them the same way you can always edit normal.dot code. As
has been stated, you will have to actually open the .dot file.

4. You can load it (or unload it) dynamically. Either manually using menus
(Templates and Add-ins), or progammatically.
I can't begin to address your "odd things" without seeing the code,
and maybe not even then. But to answer your main question, the way to
[quoted text clipped - 14 lines]
 
J

jerem

Hi Jay,

That works. Still having this close and save and saving but not closing
issue. Seems that no one can seem to figure what goes on there. Go figure?
Thanks for your help.
 
J

jerem

Hi Fumei2,

In answer to renaming the Normal.dot - I would rename it Normal.old and then
put my template in as Normal.dot just to edit and then once doing the
editing, move it out of there and rename Normal.old to Normal.dot once again
- one big convoluted procedure just to edit my macros. So, now I realize I
don't have to do that and that is good.

I placed my template in Startup because it seemed that was the only way that
I could get my darn toolbar to come up with all my macros upon opening Word
(and sometimes I have to actually go in to Templates and Add-Ins and click on
it in the list to get it to appear, which leads to this question -- what
makes some templates automatically checked in the Templates and Add-Ins list?
Some templates I notice are on the list, but not checked???

Also, I like the idea of that wee-add-in and the button on the toolbar that
loads the real add-in. Any possibility of getting you to share that code?
The reason I ask is you're absolutely right about IT coming in and trashing
stuff off of your computer - they've done it at least once to my Normal (when
I kept my macros in Normal - after the first trashing incident I learned to
always keep a copy of it elsewhere). So, if you feel like sharing - DO
SHARE!!

Thanks for your helpful comments.

Fumei2 via OfficeKB.com said:
Just as a further comment, I prefer to not have my add-ins in Startup. I
have a wee add-in in my Startup, but only does one thing. It puts a button
on a toolbar. That button loads/unloads the REAL add-in - the one with lots
and lots of procedures. That add-in is on a network drive.

That way if something happens locally, and my Startup gets trashed (the IT
people blindly reimaging the computer for example) the wee Startup add-in is
easily replaced, and my main code container is safe.
More to the point...

"Now I have to save this .dot file locally and then move it into my template
folder, delete the Normal that's there, rename my .dot file Normal in order
to get access to the code. I'm figuring there's got to be a better way than
this?????"

Do not do this. Do NOT rename the file Normal.dot.

1. You can name it anything you want. MyCode.dot, macros.dot...whatever.

2. It does NOT have to be your Templates folder. It can be anywhere.

3. To load it on Startup, put it in your Startup folder. Once Word starts,
ALL procedures (macros) in the .DOT file will be accessible. No you will NOT
be able to edit them the same way you can always edit normal.dot code. As
has been stated, you will have to actually open the .dot file.

4. You can load it (or unload it) dynamically. Either manually using menus
(Templates and Add-ins), or progammatically.
I can't begin to address your "odd things" without seeing the code,
and maybe not even then. But to answer your main question, the way to
[quoted text clipped - 14 lines]
Normal that's there, rename my .dot file Normal in order to get access to the
code. I'm figuring there's got to be a better way than this?????

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/word-programming/201003/1

.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top