Error when opening the outlook form.

M

MeAgin

Hi all,


I'm using a custom mail form in my com add-in. And I have added a list box
control to show my custom attachments.


1.. When I open the form it is showing a message,
"The form has more than one Message or Notes controls. If more than one
control is visible at run time, only one control works."
How can I overcome this?

2.. Then when I close the mail forms it prompts to save and when I say No
outlook crashes.
This issue is not related to the first because if I remove one edit box
the first message doesn't come but when I close the form this happens.
How can I overcome this?
I need to show both the controls (readonly mode) and stop outlook from
crashing.


Please help.
Thanks.
Nadee
 
K

Ken Slovak - [MVP - Outlook]

1. Do not use more than 1 Notes field in your form. The one that's there
already is the one that should be used. If you have more than 1 you get that
error.

2. No way to tell from the information provided. Are you getting any error
message? What is your form doing when it closes? Is there an event dump in
the Windows event logs? How many controls do you have on your form? Are you
using any code in the form? Did you add any controls to the form that aren't
in the MS Forms 2.0 library of controls?
 
M

MeAgin

Hi Ken,



1. In my case I need to show some files which are related to the mail and
the user can select one from the list and either open or save it. Is there
some other way I can achieve this?



2. When the form is closed a save prompt is shown and regardless of my
selection Outlook crashes. I haven't put any code to fire when closing.
Following are the events I handle from my add-in,

CurrentExplorer.SelectionChange
VBAInspectors_NewInspector
VBAInspector_Activate

I got 4 controls in the form, including the text control used for the
details part, 2 buttons and a combo box. All these are added from the
Outlook form designer itself. So all these are in the correct version I
believe. I don't have any code in the form.



In the windows log it is shown as,

Faulting application outlook.exe, version 11.0.8118.0, stamp 456628bf,
faulting module mso.dll, version 11.0.6568.0, stamp 42e18ef6, debug? 0,
fault address 0x00033346.



Please advice.



Thanks.

Nadee
 
K

Ken Slovak - [MVP - Outlook]

You could use a CommandBarCombobox control to display the list on a toolbar
or menu, you can open a form when the user presses a button or takes a
certain specific action and have the form display the list, you could add a
listbox or combobox control to the custom form and display the list there.
There are lots of alternative ways to show a list.

Mso.dll is the Office DLL, so something you're doing is crashing that DLL.
What I don't know, you will have to try to debug that. First get rid of that
control and see if the problem goes away. If not then comment out sections
of any code you are running in the form and see if it stops. Run in debug
mode in the form using breakpoints. Make sure you are handling and possibly
logging all errors in your addin. That general advice is about all I can
offer with the information I have.
 

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