Unsaved changes in the Normal template

H

Howard Kaikow

Due to sloppily written 3rd party apps/add-ins/macros, many users are
troubled by the message asking whether they want to save changes to the
Normal template.

In many/most cases, one has to know how to examine VBA code to determine the
cause of such changes.
I was thinking of doing the following in a class, but I'm not sure whether
this would help or further annoy users.

I would include code that checked for a dirty Normal template at class
startup AND before each macro runs.
I would issue a message asking whether the user wanted the macro to save the
changes now, and also give the user an opportunity to cancel the macro. The
choices would be Yes, No, Cancel.

Is the above useful?

In any case, I will include code that checks for changes in Normal when the
class terminates.
This is to assure that my code does not cause any unintentional changes in
the Normal template.
 
J

Jay Freedman

Due to sloppily written 3rd party apps/add-ins/macros, many users are
troubled by the message asking whether they want to save changes to the
Normal template.

In many/most cases, one has to know how to examine VBA code to determine the
cause of such changes.
I was thinking of doing the following in a class, but I'm not sure whether
this would help or further annoy users.

I would include code that checked for a dirty Normal template at class
startup AND before each macro runs.
I would issue a message asking whether the user wanted the macro to save the
changes now, and also give the user an opportunity to cancel the macro. The
choices would be Yes, No, Cancel.

Is the above useful?

In any case, I will include code that checks for changes in Normal when the
class terminates.
This is to assure that my code does not cause any unintentional changes in
the Normal template.

Hi Howard,

Just my 2 cents...

I would probably be annoyed by the messages, particularly if I
couldn't check some box that says "don't show this message any more".

If you intend for your class to make permanent changes in Normal.dot
with the user's permission, I'd like to see a single list at
termination that explains what each change is, and lets me select
which ones I want saved; the rest should be backed out. (The MVPs have
been asking Microsoft to build in this functionality, instead of the
blanket "changes were made" message, but it hasn't happened yet.)

If you don't intend to make permanent changes, then:
- track all changes your code makes
- if there are no other changes, just mark Normal.dot as Saved = True
before terminating so the template won't be saved
- if there are other changes that you didn't make, then back out all
of your changes before terminating but leave Normal.dot dirty

That could be a tall order, depending on what your code does.
 
H

Howard Kaikow

Jay Freedman said:
I would probably be annoyed by the messages, particularly if I
couldn't check some box that says "don't show this message any more".

Me too.
If you intend for your class to make permanent changes in Normal.dot
with the user's permission, I'd like to see a single list at
termination that explains what each change is, and lets me select
which ones I want saved; the rest should be backed out. (The MVPs have
been asking Microsoft to build in this functionality, instead of the
blanket "changes were made" message, but it hasn't happened yet.)

The code does not make changes to the Normal template, at least not
intentionally.

I'm more concerned about what is the dirty status of Normal when my code
first starts.
If dirty, then my code might get blamed for causing the dirty status.

It'a difficult problem.

I'm currently working with a template that.if loaded in Word's Startup
directory, the Notmal template is claimed to be clean.

However, if the template is attached to as document, the act of
instantiating th eclass in the associated DLL seems to cause Normal to start
with a dirty status.

Same template, same DLL, just different load point for template.

I'm going to try to reproduce the behavior with a simpler DLL and/or code in
a class in Word itself, instead of the DLL.
I expect that finding the cause will be either very simple or very
difficult, nothing in between,
If you don't intend to make permanent changes, then:
- track all changes your code makes
- if there are no other changes, just mark Normal.dot as Saved = True
before terminating so the template won't be saved

That's a NONO, if the original state of th Normal template was dirty.
- if there are other changes that you didn't make, then back out all
of your changes before terminating but leave Normal.dot dirty

That could be a tall order, depending on what your code does.

I would have no intentional changes to the Normal template, unless that were
the ONLY way top achieve a goal, or somebody was paying me to do the deed
that way.
 

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