Why Does Word Disable My Template File/Macro?

P

Paul Hooper

We have a number of very simple DOT files that contain a one-line macro and a
toolbar that are used to automate access to a product. The one-line macro is
an ActiveDocument.Shapes.AddOLEObject command that is only invoked when the
toolbar button is pushed.

The full line is

ActiveDocument.Shapes.AddOLEObject Anchor:=Selection.Range, ClassType:=
"FXDraw3.Document", FileName:="", LinkToFile:=False, DisplayAsIcon:=False

Our problem is that Word (particularly, but not exclusively Word 2003) seems
to disable this template file on irregular occasions. Users need to go to the
Templates and Add-Ins screen to re-enable them which is annoying for
everyone. Sometimes Word complains that the "last time this template file
was run, it caused a serious problem" when the template file is enabled.

Interestingly, another template file that still uses a
WordBasic.InsertObject command does not seem to be susceptible to the problem
- but that may be because that particular product is much less popular.

So the question is... Does anyone know of anything that could be triggering
this behaviour in Word?

Thanks in anticipation.

Paul Hooper
 
R

Russ

Paul,
There have been discussions in this forum recommending that one of the best
ways to handle templates in a group or network is to have each Computer
start-up script check for new templates and download them to the local hard
drive, if they are new. Then, when someone starts Word, they use the local
copies of the templates.
Local being the key word.
Also regular users don't normally alter a template, but create a new
document based on a template (normal.dot is the default template).
Do any of this help in your case?
 
P

Paul Hooper

Hi Russ,

Currently, our templates are stored in the "wrong" startup directory in the
Word program subdirectory. We store them there because our customers are
schools, and their networks are typically run by relatively inexperienced
sysadmins and the thought of writing the sort of startup script you are
describing would be an horrendous to most of them. Your reply implies that
if this is file is "non-local" (probably on a network share) then this might
prompt the problem. You may well be right but we have seen the problem on
stand-alone machines as well - the template is still in the "wrong" directory
but is certainly local.

You may be on to something however as our Office 2007 templates, which are
stored in the user profiles, do not seem to experience the same effect,
although we have very few customers using Office 2007 at this time.

I am still confused by the intermittent nature of the problem. Many
customers go years before Word spits the dummy and turns off the template.

Thanks for your thoughts in any case. Maybe we need to look to store the
templates in the User Profiles, where they should be, but that just creates
another set of headaches as we try to help sysadmins propagate the templates
across their users.

Paul
 
S

Shauna Kelly

Hi Paul

I suspect that Word often ascribes fault to the wrong party. It seems
unlikely that your one-liner would cause too much offence. Is it possible
that your users are using something else that is causing the problem? Do
they typically have other Word add-ins? Could those be causing the real
problem?

Hope this helps.

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

Paul Hooper

Hi Shauna,

Thanks for this.

Unfortunately, school networks are typically a mess and anything is possible
- although I would be fairly confident in saying that our typical user would
probably not have other add-ins installed.

Your comments have raised another possibility however. The one-liner does
call up our main software product and it, like any piece of software, is not
perfect. Crashes are rare but do happen. Is it possible that Word is
blaming the template for the sins of the invoked product? This would at
least make some sense and would explain the intermittent nature of the issue.

Hmm. Perhaps not. We probably see more product crashes here than our
customers do (due to development, testing and diagnosis) and the problem has
only surfaced once on our computers.

Thanks for your input.

Shauna Kelly said:
Hi Paul

I suspect that Word often ascribes fault to the wrong party. It seems
unlikely that your one-liner would cause too much offence. Is it possible
that your users are using something else that is causing the problem? Do
they typically have other Word add-ins? Could those be causing the real
problem?

Hope this helps.

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

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