Addin or Attached Template

Z

zSplash

I have code I want a lot of users to have access to, and I was going to just
make my code an addin. My question is, when is it better to use an attached
template rather than an addin? I don't care whether the users can step
through the code, but just that they have access to it. I realize I can
code for either an attached template or an addin.

So, what's the intended/best use of each?

TIA
 
J

Jonathan West

zSplash said:
I have code I want a lot of users to have access to, and I was going to
just
make my code an addin. My question is, when is it better to use an
attached
template rather than an addin? I don't care whether the users can step
through the code, but just that they have access to it. I realize I can
code for either an attached template or an addin.

So, what's the intended/best use of each?

This article describes the issue

Distributing macros to other users
http://www.word.mvps.org/FAQs/MacrosVBA/DistributeMacros.htm


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
Z

zSplash

Thanks, Jonathan.
I'm awfully dense, but I don't think that article answers the question about
when to use attached or when to use addins. But, I'm probably just wrong.
(Or, is common way #1 the attached and #2 an addin located in the Startup
folder??)

But, the article does bring up a related question I had: If I just locate
an addin on the server, and multiple users are using that addin installed, I
am precluded from replacing it with a new addin (with updated code). I am
unable to modify the addin as long as someone has it "opened" (and
installed), right? So, is that when the explanation about the server xcopy
comes into play? Is that what the "How can you then distribute any changes
you make to your macros in an automated way?" solves?

Thanks again for your help, Jonathan.

st.
 
J

Jonathan West

zSplash said:
Thanks, Jonathan.
I'm awfully dense, but I don't think that article answers the question
about
when to use attached or when to use addins. But, I'm probably just wrong.
(Or, is common way #1 the attached and #2 an addin located in the Startup
folder??)

If you only need the macro to be available when documents of a particular
type are opened (Category #1 in the article), then then macro goes into the
attached template.

If you need the macro generally available irrespective of what type of
document is open (Category #2 in the article), put the macro into an add-in
and put the add-in in the startup folder

But, the article does bring up a related question I had: If I just locate
an addin on the server, and multiple users are using that addin installed,
I
am precluded from replacing it with a new addin (with updated code). I am
unable to modify the addin as long as someone has it "opened" (and
installed), right? So, is that when the explanation about the server
xcopy
comes into play? Is that what the "How can you then distribute any
changes
you make to your macros in an automated way?" solves?

I recommend not putting templates or add-ins on a server for the following
reasons.

1. If the network or server goes down, quite enough of the organisation's
operations are likely to grind to a halt without unnecessarily adding
word-processing to the list by making templates unavailable for use.

2. Storing templates & add-ins locally means that users with laptops don't
need a different setup. Their templates are stored locally in just the same
way as for permanently connected desktop machines, and they can receive
updates next time they connect to the network.

3. Templates and add-ins stored locally usually load faster, reducing
startup time and improving response times for Word.

4. Templates and add-ins stored locally don't load the network with
avoidable traffic, improving performance for other applications that must
use the network.

5. Editing and updating a template at a network location is much easier if
you don't have to break everyone's lock on the file in order to replace a
template with an updated version.

6. When you open a document, if its attached network template is
unavailable, you can suffer very long delays (2 minutes or more) before the
document finally appears on screen. This is because Windows can take a long
time before finally deciding that no reply is going to come from the network
location that Word requests. If the attached template location is on a local
drive, the existence of the template can be checked very quickly, and so the
document opens immediately even if the template is not available. Microsoft
is aware of this problem, see http://support.microsoft.com/kb/830561.
Microsoft does have an operating system fix for the problem, but if you
email documents to people outside your organisation, you cannot assume that
they will have the fix installed.


The XCOPY trick is simply one way of getting templates from a central
distribution point on the network onto individual machines. If you have a
large-scale rollout to do, then talk to your network administrator. He or
she will probably already have ideas as to how to roll out new files and
applications.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
Z

zSplash

You're so helpful, Jonathan. I truly thank you. Your explanations are so
clear -- #5, was particularly important to me.

Thanks again.

st.
 

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