M
Michael Schmitz
Hello NG,
i made a simple FromRegion Addin where I have a button and a textbox.
When i click on the button in the region i am saving the value in the mail.
So far so good.
Now i want to remove this button from the form Region,
and instead the code in the eventhadler should be executed when
the user clicks on the save Button in the upper right corner of the
Dialog next to the Office Button.
I hope i made it clear what i want
Regards
Michael
Codesnippets:
################################
this._btnSave.Click += new System.EventHandler(this.On_btnSave_Click);
EventHandler ButnSave Click:
private void On_btnSave_Click(object sender, EventArgs e)
{
Outlook.MailItem mail;
Outlook.ItemProperties properties;
try
{
if (this.OutlookItem is Outlook.MailItem)
{
mail = (Outlook.MailItem)this.OutlookItem;
properties = mail.ItemProperties;
// aender den Betreff wie gewuenscht ab
mail.Subject = this._txt1.Text;
mail.Save();
}
}
finally
{
mail = null;
properties = null;
}
}
i made a simple FromRegion Addin where I have a button and a textbox.
When i click on the button in the region i am saving the value in the mail.
So far so good.
Now i want to remove this button from the form Region,
and instead the code in the eventhadler should be executed when
the user clicks on the save Button in the upper right corner of the
Dialog next to the Office Button.
I hope i made it clear what i want
Regards
Michael
Codesnippets:
################################
this._btnSave.Click += new System.EventHandler(this.On_btnSave_Click);
EventHandler ButnSave Click:
private void On_btnSave_Click(object sender, EventArgs e)
{
Outlook.MailItem mail;
Outlook.ItemProperties properties;
try
{
if (this.OutlookItem is Outlook.MailItem)
{
mail = (Outlook.MailItem)this.OutlookItem;
properties = mail.ItemProperties;
// aender den Betreff wie gewuenscht ab
mail.Subject = this._txt1.Text;
mail.Save();
}
}
finally
{
mail = null;
properties = null;
}
}