VbaProject.OTM always running, crashes when attempt to break

F

frog66

Outlook 2003

I have programmed a few "WithEvents" and associated procedures into my
VbaProject.OTM file to manage the appearance of commandbar controls in
various situations.

Something I have done appears to have placed the OTM file in a
constantly running state which I cannot break. Each attempt to break
the code causes the system to crash. each attempt to view a form
object crashes outlook. I can export the code modules and reimport
them but I seem to end up at the same place, making me think that I
have coded something to cause the problem.

While the OTM is in this "running" state I cannot comment out any code
or change anything without Outlook crashing.

Does anyone know how I can start outlook without running the
"Application_Start" routine in the OTM?

Regards

Greg
 
G

Greg J

Further to the above...

It definitely seems to be something I am doing in the code I am
writing. Unfortunately Outlook takes this crashing approach that does
not allow me to determine what I am doing wrong. I have been careful
this time to back up my forms and modules so once again, I will start
with a fresh OTM file and try to determine what is going wrong. Its
obviously something I did after the last save so should be able to
reproduce it and advise "WHAT NOT TO DO" for other users.

Would still appreciate any advice from the Guru's out there who might
know more broadly the types of things that would cause this behaviour.

Greg
 
M

Michael Bauer

Am 14 Sep 2005 21:03:03 -0700 schrieb Greg J:

Greg, without knowing your code it would be hard to say anything.

For starting OL without running the Application_Startup event I don´t know
if there´s a better way but this would work: Rename the *.otm file, start
OL, and set security settings to the highest level (assuming that you don´t
have a certificate for the project). Now you can close OL, re-rename the
*.otm and start OL again.
 
G

Greg J

Michael,

I tried that but the problem is with the OTM I am renaming. Unless I
can get the code back its difficult to see what I did to cause the
problem. Since posting this I have imported my last backup of files
and have been making changes then saving every few lines of code. It
has crashed twice but I am still none-the-wiser as to what the code is
thats causing the problem. I have restructured the "Application_Start"
routine with some more appropriate errorhandling so if there is a
problem with it the app will let me know before it decides not to work
anymore.

It seems that in 2003 apps (not just Outlook) if it cant handle an
error properly it just crashes. I have an access db that was
"corrupting" at a certain record in a database because the text in one
field was over 8000 characters long (took a while to locate the source
of the problem but thats what it was). Rather than pop up a message
telling me it was having a problem with the text it was just crashing.
As soon as I shortened the text to about 2500 characters, program ran
fine. Routhine worked fine as paint in 2000 and XP (code has been
unchanged for years). Go figure.
 
M

Michael Bauer

Am 15 Sep 2005 21:46:34 -0700 schrieb Greg J:

Error handling should be used in *every* function that can cause an error.
 

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