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.
Related
I have an VSTO Outlook Addin and I would like to know how can I change the font color of some email addresses (To:) in the compose window. Is that possible? If so how?
I want to avoid using custom form regions.
The Outlook extensibility model doesn't provide anything for that.
The best what you could do is to create a form region based on the replacement layout which substitutes the built-in controls. Be aware, you need to implement all the fields on your own in that case. A replacement form region is a page that replaces the default page of a standard form, and a replace-all form region replaces all pages in a standard Outlook form. See Walkthrough: Design an Outlook form region for more information.
According to the following image custom outlook form (.oft) file can be import.
is there way of doing it using outlook plugin programatically ?
Custom forms are not used with COM add-ins. That is entirely separate and old technology. Mostly admins deploy custom forms with code behind to organizations.
If you need to customize the Outlook UI from COM add-ins you may consider using Outlook form regions. The CompleteReplacement layout allows to replace the whole window UI or create your own custom one. See Create Outlook form regions for more information. Note, you may even load old form regions designed in Outlook.
I have an Outlook AddIn, which has custom form regions with message class name IPM.Note.XXX (for MailItem related Form Regions) as well as IPM.Appointment.XXX (for AppointmentItem related Form Regions), where XXX varies for different form regions. In a particular issue observed however, it is observed that, on the double click of date in a calendar or on click of a "New Appointment" menu option in the ribbon, my custom form region with IPM.Appointment.XXX is invoked. This is not the intended behavior and no code has been written for such thing to happen. Also, I have checked the registry entries, and those seem to be fine. So can you please let me know, what might be causing this issue?
Thanks,
Bhushan.
I am new to VSTO programming. I have created a basic addin for Outlook 2007 that monitors a folder containing XML text files which it opens and then sends them as an email, then deletes them. this all works fine.
I want the user to be able to configure certain settings for the way the addin/program will operate, such as the folder that it will monitor, and other things. The logical way to do this is to create a menu item in the addin (which I have also done) that opens a windows form (or XAML window) that allows them to enter the parameters.
In my addin I added a new item Windows Form, which worked, and the designer opened. However, in my addin code I cannot open the form. The Show() method normally associated with form objects is not available.
Is this simply something you cannot do, or am I just doing it the wrong way?
I have read about Outlook form regions, but these seemed to be attached to outlook items such as a new email, task, appointment etc... there doesnt seem to be a way to create a form region that can be opened in the main window of Outlook.
Ideally, I would like to go with my original method of opening a new window from a menu item, but if this isnt possible I would like to hear other solutions.
Thanks,
Will.
For a normal form, it sounds like you didn't just add System.Windows.Forms as a reference,
create the object then show it eg.
Form myFrm = new frmFlightList();
myFrm.Show();
This should work in a VSTO addin, as it does in any other form. The CMSConnectorControl object you refer to is a distraction to others for the general case of just wanting to display a form.
figured this out, After I built my form I just had to add these lines
CMSConnectorControl formMain = new CMSConnectorControl();
formMain.ShowDialog();
to the ThisAddin_Startup() function.
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.