ADD-INS

J

JJ

Hi there

You might think I am crazy but I'm lost for words and feel quite stupid
asking this. I have written a large document assembly system in VBA
(Word) and the whole story is run from a .dot file which is in my
startup folder. It links to an access dbase and automates quite a large
number of items. My only problem is that this .dot file is getting
quite large and I am scared that it may affect my speed in loading word
or in operating word. Is there any other way in which to run this -
apart from rewriting in another program language. I have a bit of VB
knowledge but that's it so I can't exactly rewrite 2 years of work.

Any advice will be greatly appreciated.
JJ
 
C

Chuck

It's a little difficult to offer any ideas without knowing more about what
your code is doing. For instance if you're storing autotext or other
information in your add-in that could explain some of the file bloat.

Another thing that might be happening is that sometimes when you repeatedly
edit the code in a template, the file size starts bloating for no obvious
reason. One solution is to export your modules, create a new template,
import your modules into the new template and recompile.

You might find the attached link helpful:

http://word.mvps.org/faqs/macrosvba/TemplateBloat.htm
 
J

Jonathan West

JJ said:
Hi there

You might think I am crazy but I'm lost for words and feel quite stupid
asking this. I have written a large document assembly system in VBA
(Word) and the whole story is run from a .dot file which is in my
startup folder. It links to an access dbase and automates quite a large
number of items. My only problem is that this .dot file is getting
quite large and I am scared that it may affect my speed in loading word
or in operating word. Is there any other way in which to run this -
apart from rewriting in another program language. I have a bit of VB
knowledge but that's it so I can't exactly rewrite 2 years of work.

Any advice will be greatly appreciated.
JJ

Hi JJ,

Some things to try.

1. If you have repeatedly edited your VBA code, you might be suffering from
a touch of template bloat. Go to the following article and download the free
Word Code Cleaner that will help shrink the template again. This will also
reduce the chance of the template throwing apparently random errors.

Combatting Template Bloat
http://www.word.mvps.org/FAQs/MacrosVBA/TemplateBloat.htm

2. How large is large? If the template is under 1Mb and you are using Office
2000 or later, I would say that you don't need to worry particularly
provided that you make sure you keep backups not only of the template as a
whole but also export the forms and modules, so you can rebuild the template
if necessary from the individual frm and bas files. If the template is over
1Mb, it might be worth considering any or all of the following.

a. Have you copied & pasted a lot of code in order to implement different
though similar features? If so, then you might need to look through the
project and see if you can create library routines that are called from many
different points, perhaps with different parameters. If you do this
systematically, you may find that you can cut out a surprising amount of
code. Doing this will also reduce the time taken to maintain the code, since
you will no longer have to make the same correction in several different
places.

b. If the features of the add-in can reasonably easily be separated, you
might consider splitting the project into two different templates, each of
which would then be below 1Mb.

--
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
 
J

JJ

Hi All

Thanx for the info. My template is just about 1Mb and has been edited
over a period of two years making continuous changes. I will run the
cleanup facility which I found under the link you provided and do a
backup. I thought 1Mb is already too big but according to everyone it
seems to still be relatively small. Thanx again.
 
A

AChilli

Hi JJ,

The advice to export all code into a new template is good.

I have an addin which is approximately 3MB which runs well. The only problem
I have had is when the STARTUP directory is located on a slow file server
with a lot
of users accessing it, Word would disable the addin intermittently.
 

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