Auto-Save on Exit - Not wanted

B

BAHTester

We developed an add-in tool for Microsoft Project 2007 and upon
installing it, have found that the project saves on exit automatically
whether the user wants this or not.

Is there a line of code we can direct the .NET developer to in order
to avoid this auto-save feature?
 
J

Jack Dahlgren

If you post the code for the add-in, I can probably locate the line which is
causing this. But if you don't post it, I can only say that it is somewhere
in the add-in.

-Jack Dahlgren
 
Q

Quizzed again

This can be avoided by not using the hard-close (X of death in the top right
corner). Forgive me if your situation is different than ours, but if we use
File > Close then this issue does not occur. There is some event in VBA that
flips a switch in the MSP code forcing this save to occur on hard-close. If
you close MSP and restart it, you will experience normal behavior. Aftet the
VBA code executes, it flips that switch and you are back in the situation you
describe.

I am not sure this is related but in Excel, the Saved property is both read
and write. This means the Saved property can be set programmatically from
VBA. For example, suppose a user changes a file. Under normal
circumstances, if the user then clicks the terminate icon in Excel, he will
be prompted to save the file. However, a programmer can close the file
without saving, even if changes were made, by first setting the Saved
property to True, then executing the command "ThisWorkbook.Close". (This
just an illustrative example. There are other ways to do this.) Note that
since the Saved property is "read only" in MSP, it can not be set from the
code. So in otherwords I do not know how a VBA programmer can, within his own
code, set the switch to NOT save the file.

I think this should be addressed by MS as either a bug or explained so that
we can code with a more intelligent approach that does not invoke this
behavior.

There are some very smart programmers who frequent this newsgroup and I'd
love to know if they expereince this or is it just us hackers? (no offense to
you BAHTester).
 

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