A dialog box is open.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

When i am trying display a mailitem using outlook object
model using vb as dll, i am getting getting this error
message.
"A dialog box is open. Close it and try again."

It works fine when running in the debug mode.

Any ideas.

Thanks,
Allen
 
FormA opens FormB (as modal)

From form B i am trying to display the the mailitem using
the mailitem.display.

It does not work when the formb is modal if it is not it
works.

Could not understand why? This is all in a COM addin to
outlook.
 
It will never work because you have a modal form open and you are trying to
open another form. You can't while a modal form is open. You will have to
rewrite what you are doing to either make form B non-modal, open the email
in form A after B is closed or use some other method of doing what you are
doing.
 
But the same code works in the debug mode. ie opening the
mail form from a modal form of visual basic or when i make
a exe of the same code. Will the background implmentation
differ from that in a COM addin.
 
Debug mode is different in many subtle ways from run mode. Does your code
work if you don't use a modal form?
 
Yes it does work if it is not modal. Can you explain its
working being modal in the debug mode?
 
I can't explain it because I don't know enough about the IDE internals for
debugging mode. All I can say is it won't work in run mode and that's what
you should be concerned about. You will need to do things differently.
 
Back
Top