Associating custom ribbon with custom form region - Outlook 2007, C# - c#

Is there any way how can I associate custom ribbon (custom tabs and buttons I created in VS designer) with a custom form region?
I know that I can extend the existing windows with my ribbon (such as Compose message, Contacts...), but how can I create a new tab with custom ribbons at the top and custom form region at the bottom. Do I have to create a custom message class?
Thanks.

You have to create a custom message class. Basically the ribbon and the form are two seperate mechanisms.
What you could try though, if its important for you, is invalidating the ribbon on activation of your form region and then programmatically update the ribbon according to your needs (dynamic updating of the ribbon at msdn).
If you mean it the other way around (showing a certain form region when your ribbon tab is activated) then you can't have it: there are no events/callbacks for the ribbon tabs being changed.

I have been trying to solve this issue and as Georg said the two are quite separate and behave very differently, so bringing them into line to make them appear like they are related is quite difficult.
You can have a look at my example twitter app at http://vstocontrib.codeplex.com/SourceControl/changeset/view/b35f26fdca15#src%2fDemos%2fTwitterFeedCore%2fTwitterFeed%2fContactFeed.cs
It relies on my VSTO contrib project, but it should allow you to easily achieve what you want.

Related

Searchable Combobox in Office Ribbon Control (Addin Express)

I'm developing an outlook addin using Addin Express Library. I'm currently using the adxribboncontrol.I need to implement ability to search the control based on user input.For a normal winforms control this can be easily implemented as suggested in this SO question Selecting an item in comboBox by typing
But i dont know how to implment this is office ribbon control.The control does not have the relavent properties.How can i get over this issue.
The Fluent UI (aka Ribbon UI), nor Add-in Express, doesn't provide anything for that. It is not possible on the ribbon. It has a limited number of controls.
Instead, I'd suggest creating a view/form region in Outlook where you can place any .net controls with the required functionality. See Advanced Outlook view and form regions for more information.

Best way to control Word from Windows Forms?

I am updating a Windows Forms application that was written for Office 2003. It would open Word, populate it with text from the database, create buttons appropriate for the user's security roles, and handle button clicks. The old way was with CommandBars. The Word documents created this way were stored as DB Blobs, so they were only ever available via the Forms application. That is the functionality I need, but without CommandBars.
Now, we have the Ribbon, Action Panes, VSTO, and OpenXML. I know my way around C#, but I'm new to all of these technologies.
I imagine a solution where I set up a template with the proper buttons on a nice ribbon, and the buttons raise events. If someone just tried to use the template by itself, there would be no data and the events would do nothing. But my Windows Form could create a new document based on the template, populate it with text from the database, hide inappropriate buttons, and handle button click events. Easy peasy.
I began by adding a Word 2010 Template project and making a ribbon for it. It looks nice in the debugger. But, I can't create a new document with it from a Console app. Word launches, but the ribbon isn't there. There's a note in the documentation that "If a Microsoft Office Word template has managed code extensions, the project assembly is not called if the template is attached as a global template or loaded from the startup directory of Word. In addition, the document does not recognize the format of a template that is part of an Office solution." I believe this means my template is useless. I can't open Word and make a new document with my template or call the template from another project, so, pointless.
All the MS help has failed me, and mostly leads me in circles. I need some direction. For each piece of the scenario I described, what is the most appropriate modern technology? For each technology I need to use, what is the best resource for my situation?

Customize Outlook 2010 / 2013 navigation pane to add totally new functionality

I am exploring the possibility of customizing office outlook to add some new functionality.
Here is what I am trying to achieve.
Add a new navigation pane functionality similar to, Mail, Calender, Contacts, ...
I can achieve this as documented here.
The main form that accompanies the navigation pane, should be totally customizable. I define the controls, its position, events on the controls, ect. Typical development of a form.
(To add on to this, have a similar look and feel, so should be able to use the same controls, fonts, theme, color)
I must have the ability to define interfaces, to be able to receive data from another source like maybe a server not related to office server for mails (The data will be displayed on form).
Modify the data and send back.
Is this possible?
Does office allow me to customize to the extent, that I can define interfaces and have customized forms?

c# Outlook add-in custom Icons with custom Region Form

I'm developing an Outlook 2010 addin in Visual Studio 2010.
I have created a custom Form Region that is going to implement the messageClass called:
IPM.Note.Archivado
This class is going to be assigned to processed messages by an application using exchange
web services that will run nightly. This is tested and working ok. When the Form Region
is loading I can recover the:
message.MessageClass as "IPM.Note.Archivado"
Ok, What I need now, It's to assign a different inbox icon to the messages that matches
that messageClass, so I used the property panel in the custom Region Form and selected
icons for read, forwared, default, actions without problem.
I can achieve this if I choose the FormRegionType as replacement or Replace-ALL in the
manifest, but what I need is this form windows to be AdJoining.
When the formRegionType is adjoining I can not get the assigned icons to load in the
inbox panel.
I have been reading a lot of documentation but I can't find the solution to my problem.
Here it's form Region definition:
[Microsoft.Office.Tools.Outlook.FormRegionMessageClass(Microsoft.Office.Tools.Outlook.FormRegionMessageClassAttribute.Note)]
[Microsoft.Office.Tools.Outlook.FormRegionMessageClass("IPM.Note.Archivado")]
[Microsoft.Office.Tools.Outlook.FormRegionName("hnaOutlookAddin.FormRegionMessageClassArchivado")]
public partial class FormRegionMessageClassArchivadoFactory
{
}
For custom Outlook icons - you must use a replacement form region. If you need an adjoining form region - you need to create another class. You can have multiple form regions targeting the same message class. I've used both replacement and adjoining form regions for IPM.Note.XXXX.

Creating a custom menu in .NET WinForms

Using .NET 2.0 with WinForms, I'd like to create a custom, multi-columned menu (similiar to the word 2007 look&feel, but without the ribbon).
My approach was creating a control, and using a left/right docked toolstrip, I have constructed a similar look&feel of a menu. However, there are a few shortcomings of this solution, such as
the control can only be placed, and displayed within the form;
if the form is too small, some area of the control won't be displayed;
the control also have to be manually shown/hidden.
Thus, I'm looking for a way to display this control outside of the boundaries of the application. Creating a new form would result in title-bar deactivating on display, so that's also out. Alternatively, any other approach to create a customized menu would be very welcomed.
Edit: I don't want to use any commercial products for this; and since it's about a simple menu customization, it's not related to Microsoft's ribbon "research" in any way.
unless you are in the business of providing .net components, you should be looking to buy it off the shelf. Its a lot of work getting such a control right - There are already vendors providing this kind of UI. e.g. ComponentOne
if you are trying to build this component as a product, you should look at the link below. Apparently Microsoft has a 'royalty-free' license around the Office UI to protect their R&D investments. As of now you need to tell them that you are using something similar to the Office UI. More of that here
The MenuStrip class has a Renderer property. You can assign your own ToolStripRenderer derived class to customize the painting. It's a fair amount of work.

Categories

Resources