Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I've created a custom form region for sending messages. Basically when composing a new message, replying, or forwarding you can toggle between the standard Outlook form or my custom form.

The major functionality seems to be working. My only problem now, is when you toggle to my custom form most of the buttons in the main ribbon (ie: "Attach File", "Address Book", "Spelling", etc) are disabled.

Any idea how I can access these buttons?


Edit: Code moved from own OP-Answer here.

I still can't get these buttons enabled. From everything I'm reading and seeing with Outlook's form designer (I'm developing in Visual Studio using C# btw) the problem is related to Microsoft.Office.Interop.Outlook._DocSiteControl.

This is the message body control. It has a property SuppressAttachments. I created a class that extends Window's RichTextBox and implements DocSiteControl and then set SuppressAttachments = 0 in its initialization but still no go.

C#
public class MyTextBox : System.Windows.Forms.RichTextBox, Microsoft.Office.Interop.Outlook._DocSiteControl
{
    private sbyte _suppressAttachements;
    private sbyte _readOnly;
    public sbyte ReadOnly
    {
        get { return _readOnly; }
        set { _readOnly = value; }
    }

    public sbyte SuppressAttachments
    {
        get { return _suppressAttachements; }
        set { _suppressAttachements = value; }
    }
}
Posted
Updated 23-Mar-12 14:51pm
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900