Announcement

Collapse
No announcement yet.

Commandbar in Outlook einfügen

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Commandbar in Outlook einfügen

    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

  • #2
    Hallo,

    Microsoft stellt aus ausführliches Schritt-für-Schritt-Beispiel in seiner Knowlegde Base als Artikel "<i>HOW TO: Build an Office COM Add-in by Using Visual Basic .NET (Q302896)</i>" zur Verfügung: <i>http://support.microsoft.com/default.aspx?scid=kb;en-us;Q302901</i&gt

    Comment

    Working...
    X