Hallo zusammen,
ich möchte in mein Outlook eine CommandBar mit einigen Button einfügen. Das plazieren der Button auf einer bestehenden Leiste funktioniert problemlos.
Jetzt habe ich versucht eine eigene Leiste ins Outlook einzufügen. Leider weiß ich nicht, welche Attribute ich der Explorer.Add Funktion mitgeben muss.
<schnipp>
public class Connect : Object, Extensibility.IDTExtensibility2
{
Outlook.Application outlookApp = null;
string toolbarName = "MyToolbar";
public Connect()
{
}
private void SetApplicationFields(object application)
{
if (application is Outlook.Application)
{
outlookApp = (Outlook.Application)application;
}
}
private Microsoft.Office.Core.CommandBar AddMyToolbar(Outlook.Application outlook, string toolbarName)
{
Microsoft.Office.Core.CommandBar toolBar = null;
try
{
object missing = System.Reflection.Missing.Value;
toolBar = (Microsoft.Office.Core.CommandBar)
<b>outlookApp.Explorers.Add(??,??);</b>
toolBar.Visible = true;
return toolBar;
}
catch
{
return null;
}
}
<schnapp>
Denn Rest des Codes hab ich mal weg gelassen.
Vielen Dank!
Patrick
ich möchte in mein Outlook eine CommandBar mit einigen Button einfügen. Das plazieren der Button auf einer bestehenden Leiste funktioniert problemlos.
Jetzt habe ich versucht eine eigene Leiste ins Outlook einzufügen. Leider weiß ich nicht, welche Attribute ich der Explorer.Add Funktion mitgeben muss.
<schnipp>
public class Connect : Object, Extensibility.IDTExtensibility2
{
Outlook.Application outlookApp = null;
string toolbarName = "MyToolbar";
public Connect()
{
}
private void SetApplicationFields(object application)
{
if (application is Outlook.Application)
{
outlookApp = (Outlook.Application)application;
}
}
private Microsoft.Office.Core.CommandBar AddMyToolbar(Outlook.Application outlook, string toolbarName)
{
Microsoft.Office.Core.CommandBar toolBar = null;
try
{
object missing = System.Reflection.Missing.Value;
toolBar = (Microsoft.Office.Core.CommandBar)
<b>outlookApp.Explorers.Add(??,??);</b>
toolBar.Visible = true;
return toolBar;
}
catch
{
return null;
}
}
<schnapp>
Denn Rest des Codes hab ich mal weg gelassen.
Vielen Dank!
Patrick
Comment