.Net Addin causes Error in Outlook Notes

J

Jeanine

I developed a vb.net addin for Outlook that generates an error when outlook is closed. The error only occurs if you have created/edited a note in Outlook before closing Outlook. The error message I receive is:

Could not complete the operation. One or more parameter values are not valid. The note will close and your changes will not be saved.

I have stepped through my code found that when a new email is opened, a new inspector event is triggered and when the email is closed a close inspector event triggers. When a new note is opened the new inspector event runs, but when I close the note, the close inspector event is not run.

Does anybody have any ideas as to why the close inspector event wouldn't run for notes?

I'd appreciate any ideas or suggestions.

Thanks
Jeanine
 
K

Ken Slovak - [MVP - Outlook]

Outlook notes ("IPM.StickyNote) don't support an Inspector toolbar correctly
and that's the source of your problem. In NewInspector or where you create
the buttons check for the type of the item in the Inspector
(Inspector.CurrentItem.Class <> olNote) and don't create the buttons if it's
a note item.




Jeanine said:
I developed a vb.net addin for Outlook that generates an error when
outlook is closed. The error only occurs if you have created/edited a note
in Outlook before closing Outlook. The error message I receive is:
Could not complete the operation. One or more parameter values are not
valid. The note will close and your changes will not be saved.
I have stepped through my code found that when a new email is opened, a
new inspector event is triggered and when the email is closed a close
inspector event triggers. When a new note is opened the new inspector event
runs, but when I close the note, the close inspector event is not run.
 
K

Ken Slovak - [MVP - Outlook]

Notes are sort of brain-dead, I wouldn't depend on much of anything working
correctly with them. I don't even know if Inspector.Close would fire
correctly. Unless you absolutely have to do something with Notes I'd just
not instantiate them into the class wrapper collection when NewInspector
fires.




Jeanine said:
Hi, thanks for your response. I tried what you suggested and even
commented out my code to create a toolbar, but unfortunately it didn't solve
the problem.
I am using your (I think) Inspector wrapper class in my vb.net addin. I
looked up one of your previous posts re "handling multiple inspector" and
you mentioned that some inspector events don't fire under certain
conditions - in my case inspector close event for note items. I have
checked that my objects have with events specified etc. Maybe I am using
your wrapper class slightly incorrectly.
 

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