Question: I want to know how do I set the headers of email on click on checkboxes. I have created required checkboxes in FormRegion.

Example: 
I have checkbox named HighImportance, on click of that I want to change the email header.
I tried this, but it doesn't work:

```
private void checkBox2_CheckedChanged(object sender, EventArgs e)
{
    this.OutlookItem.Importance = 2;
}

```

Answer: 
Cast the item as a MailItem, then set its importance.

```
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
  Outlook.MailItem myMailItem = (Outlook.MailItem)this.OutlookItem;
  myMailItem.Importance = Outlook.OlImportance.olImportanceHigh
}

```
You have to use the following property:

> 
> PR\_IMPORTANCE
> Identifier:
> 
> 
> 0x0017
> 
> 
> Data type:
> 
> 
> PT\_LONG
> Area:
> 
> 
> General messaging
> 
> 
> 

Accepted values:

> 
> IMPORTANCE\_LOW
> 
> 
> IMPORTANCE\_HIGH
> 
> 
> IMPORTANCE\_NORMAL
> 
> 
> 

[http://msdn.microsoft.com/en-us/library/office/cc815346(v=office.12).aspx](http://msdn.microsoft.com/en-us/library/office/cc815346%28v=office.12%29.aspx)

**Here you have a code sample I did some time ago:**

Set the property:

```
private string HighPrioritySchema="http://schemas.microsoft.com/mapi/proptag/0x0017";

//Being item an Oulook Item:

  item = (Microsoft.Office.Interop.Outlook.MailItem)folder.Items[i];   
  item.UserProperties.Add(HighPrioritySchema,
                             Outlook.OlUserPropertyType.olText, true,
                             Outlook.OlUserPropertyType.olText);
  item.UserProperties[HighPrioritySchema].Value = "IMPORTANCE_HIGH";    
  item.Save();  

```

**`//To get the property that has been previously set:`**

```
 Outlook.PropertyAccessor pacc = item.PropertyAccessor;
 pacc.GetProperties(HighPrioritySchema);

```