With a VSTO add-in, is it possible to replace the Outlook 2013 new email body editor with something custom?
(What I want is MarkdownOutlook which is a good start but I want it to show side-by-side preview and better keystroke handling (like tab) closer to http://dillinger.io/)
Thanks!
You'd have to use custom forms to edit the UI of the IPM.Note message class and replace the Body control with another editor control. This is not a trivial thing to do as Word is the default editor and there is a very tight coupling with Outlook for message viewing/editing functionality.
Another alternative to customizing the message class is to create an Add-in Express or Outlook Form Region that replaces the default form UI entirely with your .NET Windows Form. But that's even more work as you'd need to recreate the message envelope controls for sending.
Related
When you open an email by doing double click on it, I would like to know is the top panel of the email (header - indicate in the screenshot with a blue rectangle -) can be customized by adding text or other controls. Also in the context menu that appears when you click on the three dots button, I would like to know if I can add some options there. If that possible. Below I attach a screenshot and I indicate there the places where I would like to place these things (see blue arrows).
Also I would like to do the same in the preview area where the mail is shown when you select it from the messages list.
The Outlook extensibility model doesn't provide anything for customizing these bits. There is no trivial way to get the job done. The best what you could do is to develop a form region (Replacement or Replace-All) which can substitute the whole inspector UI, so you could re-build it from scratch. Read more about Outlook form regions in the Walkthrough: Design an Outlook form region article.
Also you may consider putting a form region with your custom information at the top of the window, but right below this pane. See Advanced Outlook view and form regions from Add-in Express.
Can someone please please provide the link or code snippet to raise an event from the click of the oulook ribbion button and we are able to subscribe it from the another project on the click of another button and get the data passed in it.
You can't directly - ribbon control events are only passed to the addin that created the ribbon controls in question. You can of course call any external code (including through Addin.Object) from the addin processing the event.
You can handle clicks on the built-in controls on the ribbon. Read more about that in the Temporarily Repurpose Commands on the Office Fluent Ribbon article.
But for the custom ribbon UI you need to ask for any public interface which can be consumed by others, so instead of trying to repurpose controls you could directly call the method or function in the add-in.
I have requirement to disable outlook vsto plugin icon if user open email from saved location . its job is to select highlighted emails from outlook and saved to external crm . There is new requirement that if email is saved on disk and re opened again it still shows the outlook plugin incon , i have to disable the incon if email is opened from disk .
any idea how to achieve this . I user select any email from outlook it should be fine but if email is saved on disk outlook addin icon should be disabled.
Many thanks
As a rule, mail items opened from the disk don't have the EntryID property set. I'd suggest starting from the NewInspector event which is fired whenever a new inspector window is opened, either as a result of user action or through program code. So, you may check whether the EntryID exists and whether item is not composed one which means newly created in Outlook. The PR_MESSAGE_FLAGS property provides flags that can be used to identify whether it is read-only or composed item.
As for the Fluent UI, you need to use the IRibbonUI.Invalidate or IRibbonUI.InvalidateControl methods. You can customize the Ribbon UI by using callback procedures in COM add-ins. For each of the callbacks the add-in implements, the responses are cached. For example, if an add-in writer implements the getImage callback procedure for a button, the function is called once, the image loads, and then if the image needs to be updated, the cached image is used instead of recalling the procedure. This process remains in-place until the add-in signals that the cached values are invalid by using the Invalidate method, at which time, the callback procedure is again called and the return response is cached. The add-in can then force an immediate update of the UI by calling the Refresh method. The getVisible callback should be used for hiding and displaying the ribbon UI dynamically.
The Fluent UI (aka Ribbon UI) is described in-depth in the following series of articles:
Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)
I want to add custom text in label which will be information to the user who opens email compose window.
I have tried using form regions, but it do not allow adding new forms in IPM.Note at any location. I think there are only 4 ways to add form regions like adjoining, replace, replace all and separate.
Is there any other way using which I can add this label/message below the subject? I know we can do it using add-in express but I do not want to use it.
Unfortunately, the adjoining layout doesn't allow placing a form region on top of the window. The best what you can do is to create an adjucent Outlook window, see Creating Adjacent Windows In Outlook for more information.
And yes, an alternative way is to use Add-in Express which supports the required layout - TopSubpane.
I'm trying to create an Outlook Add-In that will forward the selected mail message as an attachment when the button is pressed. Preferably this will work both for the Outlook Client, and Outlook Web Access. To do this, I need to add a button to the main UI in Outlook which shows the list of messages.
However, within the new Add-In format, I don't see an ExtensionPoint for Outlook that allows adding a button to the main mail UI.
https://learn.microsoft.com/en-us/office/dev/add-ins/reference/manifest/extensionpoint#extension-points-for-word-excel-powerpoint-and-onenote-add-in-commands
There are options for the MessageRead pane or the MessageCompose pane, but I don't see anything for the general overview.
However, the following New Feature complains that multiple mail items can't be selected with the add-in syntax, which seems to imply that a single mail item can be selected. If a single mail item can be selected, then that implies that there is a way to add a button to the overview mail page since that's the only place mail can be selected.
This makes me think it is possible to do this, but I'm not sure how.
Can someone please point me to how this might be done?
NOTE: I am NOT trying to create a COM plugin. That is the old format and I've noticed they're increasingly less reliable in Outlook 2016. I am trying to use the new format.
The MessageReadCommandSurface and MessageComposeCommandSurface extension points for Outlook applies to both the main Outlook window (the Explorer) and the item (Inspector) windows. The Explorer Ribbon buttons activate when an email is selected, so the buttons interact on the selected email. So you don't have to do anything if you've already defined those extension points.