Outlook trying to close itself after creating new mail N2

Add-in Express™ Support Service
That's what is more important than anything else

Outlook trying to close itself after creating new mail N2
 
Sergey Filimonenko




Posts: 4
Joined: 2012-09-06
Hello!
I have faced to problem, that described in topic Here
I use Outlook Security Manager 2010 ActiveX with Outlook 2010 x64
When I call Disconnect method and Outlook instance has not been created yet, appears message about save changes.
Described workaround is not quite fit, because of need to save mailitem in drafts and recreate outlook instance.
It slows down my application and increases size of outlook folders. It also complicates the application code due to the implementation of the dual logic of behavior.
Do you fix this problem?
Posted 06 Sep, 2012 03:24:16 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Sergey,

Could you please specify the build number of the Security Manager component you have currently installed on the PC?

1. Save the EntryID of the created mail item;
2. Don't call the Display method;
3. Switch the security on (call the Disconnect method);
4. Create a new Outlook application instance;
5. Find the mail item with the EntryID you saved before using the GetItemFromID method of the Outlook Namespace class;
6. Call the Display method for the found item.


Please note that you need to close opened items and call the save method if you did any changes. Later, right after you created a new Outlook instance, you can find the modified item and open it anew. Does it work?
.NET, Extended MAPI, Windows Phone & RT
Posted 06 Sep, 2012 04:20:25 Top
Sergey Filimonenko




Posts: 4
Joined: 2012-09-06
Hi Eugene!

Version 6.2 Public Release (build 1030)

You have described to me the workaround, that not suitable for me as I say in my previous post.
I don't need to save new created mail to drafts and recreate outlook instance (for some logical reason). I need show to user mail formed from my application.
Why executing Disconnect method cause to closing outlook application (if it wasn't loaded before)?
Posted 06 Sep, 2012 05:26:03 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Sergey,

How can I reproduce the issue described in your initial post?

Could you please prepare a newly created sample application which can reproduce the issue and then send its sources to the support e-mail address for testing on our PCs? Please find the support e-mail address in the readme.txt file (see the Add-in Express installation folder).
.NET, Extended MAPI, Windows Phone & RT
Posted 06 Sep, 2012 08:52:28 Top
Sergey Filimonenko




Posts: 4
Joined: 2012-09-06
Hi Eugene!

I just sent the sample code to your support.
Posted 07 Sep, 2012 00:51:03 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Sergey,

Thank you. I will try to reproduce the issue today.
.NET, Extended MAPI, Windows Phone & RT
Posted 07 Sep, 2012 02:19:00 Top
Sergey Filimonenko




Posts: 4
Joined: 2012-09-06
Hi Eugene!

I found out that the bug is reproducible only in Outlook version 2010 (x32 and x64)
Posted 07 Sep, 2012 07:23:44 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Sergey,

Thank you for providing us with the detailed description of the issue in the e-mail message. Finally, I have reproduced the issue on my PC with Outlook 2010 (x64) installed and then filed it to our bug-tracking system under #4278. As soon as I get any news from developers I will let you know.

I thank you for your time and patience!
.NET, Extended MAPI, Windows Phone & RT
Posted 07 Sep, 2012 11:02:25 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Sergey,

We have just found that in case of Outlook 2010 you need to pass an instance of the Inspector class to the ConnectTo method of the Outlook Security Manager component. It prevents Outlook from closing and displaying additional message boxes for saving an e-mail message. For example, you can use the following code:

objItem = OutlookApp.CreateItem(0);
objInspector = objItem.GetInspector();
SecurityManager.ConnectTo(objInspector);


Also I've sent the full source code to your e-mail address. Please test the sample code in the fields and then let me know whether it helps. I am looking forward for your results...
.NET, Extended MAPI, Windows Phone & RT
Posted 18 Sep, 2012 12:20:55 Top