Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Interop / October 2007

Tip: Looking for answers? Try searching our database.

Opening Outlook using MAPI locks main interface

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
nagar@community.nospam - 29 Sep 2007 09:49 GMT
I'm opening Outlook from a C# appplication using MAPI. Outlook
correctly created a new email window but the main application window
is disabled.
I noticed that the same thing happens when composing a new email with
attachment using the context menu (send attachment to email
recipient).

Is there a way to prevent the main window to disable itself (the same
way it happens when you compose a new email directly from inside
outlook?)
Thanks,
Andrea
Dmitry Streblechenko - 30 Sep 2007 17:17 GMT
Whatr is the relevant snppet of your code hat locks your app?
Are you calling IMAPISession.ShowForm() To display a message modelessly, use
IMAPIForm.DoVerb(EXCHIVERB_OPEN, ...).
Why are you opening a form using MAPI? Outlook Object Model would be a lot
easier.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool

> I'm opening Outlook from a C# appplication using MAPI. Outlook
> correctly created a new email window but the main application window
[quoted text clipped - 8 lines]
> Thanks,
> Andrea
nagar@community.nospam - 02 Oct 2007 20:24 GMT
Thanks for the reply.
I'm using MAPI because I need to connect to any email application.
I'm currently calling
int error = MAPISendMail(IntPtr.Zero, IntPtr.Zero, message,
MAPI_DIALOG, 0);

What call should I make? I don't want to send a message but just open
a new precompiled email message.

Do you have a snippet of code to do that?
Do you think it's better to use MAPI for all the applications and so
something different for Outlook?

Thanks.
Andrea

>Whatr is the relevant snppet of your code hat locks your app?
>Are you calling IMAPISession.ShowForm() To display a message modelessly, use
[quoted text clipped - 19 lines]
>> Thanks,
>> Andrea
Dmitry Streblechenko - 02 Oct 2007 21:51 GMT
OK, that is Simple MAPI, I meant Extended MAPI (which only Outlook
supports).
There is nothing you can do in Simple MAPI...
You can test that the user has Outlook installed and use OOM instead:

set App = CreateObject("Outlook.Application")
set Msg = App.CreateItem(0)
Msg.Subject = "test subject"
Msg.Display

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool

> Thanks for the reply.
> I'm using MAPI because I need to connect to any email application.
[quoted text clipped - 36 lines]
>>> Thanks,
>>> Andrea
nagar@community.nospam - 06 Oct 2007 19:30 GMT
Thanks. I'll look into that.
Andrea

>OK, that is Simple MAPI, I meant Extended MAPI (which only Outlook
>supports).
[quoted text clipped - 51 lines]
>>>> Thanks,
>>>> Andrea
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.