---
title: "Open outlook message window in wpf"  
description: "Open outlook message window in wpfIn this blog I am trying to explain the concept of how can I  open outlook message window in wpf.You can firstly add"  
author: "Vijay Shukla"  
published: 2013-08-16  
updated: 2014-09-18  
canonical: https://www.mindstick.com/blog/564/open-outlook-message-window-in-wpf  
category: "wpf"  
tags: ["wpf"]  
reading_time: 2 minutes  

---

# Open outlook message window in wpf

Open [outlook](https://www.mindstick.com/blog/135055/how-to-change-your-account-password-in-outlook-com-toll-free-number-1-844-832-5538) [message](https://www.mindstick.com/forum/12802/show-confirmation-message-yes-or-no-in-asp-dot-net) window in wpf

In this blog I [am trying](https://answers.mindstick.com/qa/36834/which-two-programming-languages-should-i-master-in-if-i-am-trying-to-get-into-google-or-facebook) to [explain the concept](https://www.mindstick.com/forum/159605/explain-the-concept-of-unique-key-violation-error) of how can I open outlook message window in wpf.

You can firstly add the reference of Microsoft.Office.Interop.Outlook for [add reference](https://www.mindstick.com/forum/548/how-to-add-reference-to-system-web-optimization) in solution [explorer](https://www.mindstick.com/forum/34658/want-to-developed-windows-explorer-without-using-telerik) and then create a [simple](https://yourviews.mindstick.com/story/1469/5-simple-ways-to-stay-fit-amp-healthy) UI like below image:-

\
![Open outlook message window in wpf](https://www.mindstick.com/blogs/f5ddfb02-a49d-443b-90f0-61379073798a/images/d2be98b5-25fb-405e-8d50-6306e9e4e1ee.png)

![Open outlook message window in wpf](file:///C:/Users/AVADHE~1/AppData/Local/Temp/msohtmlclip1/01/clip_image001.png)

.xaml code:

<Window x:Class="wpfMailClient.MainWindow"

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

Title="MainWindow" Height="350" Width="525">

<Grid>

<Button Content="btnSend" Height="23" HorizontalAlignment="Left" Margin="416,252,0,0" Name="button1" VerticalAlignment="Top" Width="75" Click="button1_Click" />

<TextBox Height="23" HorizontalAlignment="Left" Margin="111,25,0,0" Name="txtEmail" VerticalAlignment="Top" Width="380" />

<TextBox Height="23" HorizontalAlignment="Left" Margin="111,54,0,0" Name="txtSubject" VerticalAlignment="Top" Width="380" />

<Label Content="Email" Height="28" HorizontalAlignment="Left" Margin="40,21,0,0" Name="lblEmail" VerticalAlignment="Top" />

<Label Content="Subject" Height="28" HorizontalAlignment="Left" Margin="40,50,0,0" Name="lblSubject" VerticalAlignment="Top" />

<TextBox Height="157" HorizontalAlignment="Left" Margin="111,88,0,0" Name="txtBody" VerticalAlignment="Top" Width="380" />

</Grid>

</Window>

.cs Code:-

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Windows;

using System.Windows.Controls;

using System.Windows.Data;

using System.Windows.Documents;

using System.Windows.Input;

using System.Windows.Media;

using System.Windows.Media.Imaging;

using System.Windows.Navigation;

using System.Windows.Shapes;

namespace wpfMailClient

{

/// <summary>

/// Interaction logic for MainWindow.xaml

/// </summary>

public partial class MainWindow : Window

{

public MainWindow()

{

InitializeComponent();

}

private void button1_Click(object sender, RoutedEventArgs e)

{

Microsoft.Office.Interop.Outlook.Application outlookApp = new Microsoft.Office.Interop.Outlook.Application();

Microsoft.Office.Interop.Outlook.MailItem message =

(Microsoft.Office.Interop.Outlook.MailItem)outlookApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem);

message.Subject = "Testing Mail!";

message.Recipients.Add("some@email.com");

message.Body = "Hello. This is body area, write your mail here.";

message.Display(false);

}

}

}

---

Original Source: https://www.mindstick.com/blog/564/open-outlook-message-window-in-wpf

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
