I was searching for few days and cannot find any solution. Do you know how to hide the header text and header "toolbar" in the adjoining Outlook addin?
I dont want to have the text "My custom addin" and i dont want to have this "+" and line.
You might be happier with a "Custom Task Pane." It still has some UI associated with it, but it's prettier.
Or, you can use a blank space (ie. " ") for the title:
To create one, create a UserControl in your project. That's MyTaskPane below. Then, in your ThisAddIn class, create the task pane for windows that you want it on. The following would create the task pane on every window.
You should also remove the task panes when each window closes as described in the MSDN documentation.
public partial class ThisAddIn
{
Inspectors _inspectors;
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
MyTaskPane pane = new MyTaskPane();
var taskPane = this.CustomTaskPanes.Add(pane, "My Custom Task Pane");
taskPane.Visible = true;
_inspectors = Application.Inspectors;
_inspectors.NewInspector += Inspectors_NewInspector;
}
void Inspectors_NewInspector(Outlook.Inspector Inspector)
{
MyTaskPane pane = new MyTaskPane();
var taskPane = this.CustomTaskPanes.Add(pane, "My Custom Task Pane", Inspector);
taskPane.DockPosition = Office.MsoCTPDockPosition.msoCTPDockPositionBottom;
taskPane.Visible = true;
}
private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
{
}
#region VSTO generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InternalStartup()
{
this.Startup += new System.EventHandler(ThisAddIn_Startup);
this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
}
#endregion
}