473,499 Members | 1,774 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to simply display the Outlook 2010 window

I've created a very simple Office Outlook addin (using Visual Studio 2010 C#) that displays a Winform pops up a window when a new message arrives (using NewMailEx), and adds the sender, subject and received time to a listview object on the form. (The addin is a client only addin and will only be running if Outlook has been started). That all works just fine.

Now all I want to do is create a method that is actived by a click event of a button that is ON MY WinForm that was instantiated from the simply activates/displays/opens/maximizes/whatever... Outlook Inbox window to the front of any other applications. This to me seems like a very easy thing to do but I'm stumped. Below is my

Expand|Select|Wrap|Line Numbers
  1.     public partial class ThisAddIn
  2.     {
  3.     public Outlook.Explorer myOutlookExplorer;
  4.     frmNewMailAlert fm = new frmNewMailAlert();
  5.         Outlook.ApplicationEvents_11_NewMailExEventHandler newEmailHandler;
  6.  
  7.  
  8.         private void ThisAddIn_Startup(object sender, System.EventArgs e){
  9.             newEmailHandler = new Outlook.ApplicationEvents_11_NewMailExEventHandler(Application_NewMailEx);
  10.             Globals.ThisAddIn.Application.NewMailEx += new Outlook.ApplicationEvents_11_NewMailExEventHandler(Application_NewMailEx);
  11.             fm.lvMessages.View = View.Details;
  12.             fm.lvMessages.Items.Clear();
  13.     }
  14.     }
  15.  
Oct 31 '10 #1
0 1770

Sign in to post your reply or Sign up for a free account.

Similar topics

2
3397
by: Al Sav | last post by:
Hi, I am trying to create a menu for asp.net page. The menu-detail list display, when mouse hovers over the main menu list, like you see in regular windows apps. When the detail-menu-list window...
2
768
by: MaxH | last post by:
I need to perform programmatically from a C# .net application the following tasks: _ open an outlook (or default e-mail client) compose message window; _ attach a document to the new message; _...
2
1381
by: Peter Steele | last post by:
Say I have a managed C++ app with some code that looks something like this: void MyMethod() { struct Point { int x, y; }; Point* p = new Point; p.x = 1; p.y = 2;
0
1135
by: brbxx99x | last post by:
Hi, I'm just wondering how I can display the outlook address list (the screen that is displayed when one clicks on either the TO, CC or BCC buttons) and retrieve the email addresses that the user...
0
1256
by: Alison | last post by:
Hi I wondered how to reference and display a command window together with menus and toolbars in the user interface written in VB .Net. I added envdte reference, but I do not know how to proceed from...
15
14409
by: Matt | last post by:
Is there a way to display the file selection window for a file input field via JavaScript? My goal is to emulate the behavior seen in Yahoo! Mail BETA. When adding an attachment, it displays a...
5
1780
by: raymonj | last post by:
Hi, Is it possible to display the Outlook recipient window from Vb.Net and receive the email selection the user has chosen when the window is closed ? Thanks folks.
4
28435
by: Andy | last post by:
Hi, I have a C# application and I'd like it to use Outlook 2003 to send messages. I don't want to send them programmaticlly though; I just want to open the New Messge window, set the...
9
2564
by: tshad | last post by:
This was posted before but the message got messed up (all NLs were stripped out for some reason). I have 2 labels that hold the name of different images on my .aspx page. <asp:Label ID="Logo"...
0
1245
by: mkhan | last post by:
Hi, i have been having trouble how to open the 'To' Contacts list(Cc or To) (address book) of a mail message in outlook using vb.net from where the user would be able to select an email address and...
0
7131
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7007
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7174
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7220
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6894
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5470
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3099
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
297
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.