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.
Related
On folder selection (Inbox, Deleted, Sent, etc.) the Outlook email items are shown listed in the explorer view as a list of Outlook items.
For each Outlook items, some icons (attach, etc.) are show on the right. How can I add new icons there for each outlook item? I want to do the same as explained here or here, but instead of changing an existing one, I would like to add a new one/s.
Additionally (this is optional) it would be great if I could execute some code when user clicks on it but I am ok if I can just show it.
UPDATE 05/10/2022
There are two posibilities:
Add new columns to the message grid preview in the explorer view, I mean put more columns at the beginning or after the last column (flag one). This view is obtained when you resize the width of the messages grid:
Use the existing last column of the messages grid preview, marked with a flag, and put there more icons with its click event handlers.
Is it possible to implement both above solutions?
There is no trivial way to inject custom icons there. The best what you could do is to use the PR_ICON_INDEX property with a set of predefined icons. The property contains a number that indicates which icon to use when you display a group of email objects.
As explained in the articles mentioned in your post you can use the PropertyAccessor.SetProperty to set up an icon for Outlook items.
Additionally (this is optional) it would be great if I could execute some code when user clicks on it but I am ok if I can just show it.
You can handle the SelectionChange event of the Explorer class which is fired when the user selects a different or additional Microsoft Outlook item programmatically or by interacting with the user interface. The Outlook object model doesn't provide any other events for that.
There is no way to add a new icon next to the old one - the message view in Outlook does not support that level of customization.
The only way to replace a build-in icon with a truly custom one (instead of using one from a few dozen predefined icons) is to create a custom form (even if exposes no customization) and specify an icon for that form. If the message class (MailItem.MessageClass) matches that of a custom form, Outlook will show your custom icon. Not ideal at all.
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.
how can i find the specific button on design mode where i have several buttons ie: hundered of buttons so that they all like spaghetti and one button may be under another button or a groupbox (i might be playing with the visibilities ) and i want to see my button number 83 on the design. how can i see him? where is he hiding? :) i use visual studio as an IDE. thanks.
MessageBox.Show(" where is the specific button? i know that he is somewhere on the form but cant distinguish it on the design since its somewhere under something i cant find it");
Use Document Outline (View - Other Windows - Document Outline)
Just pick the button from the tree and voila.
PS: this works for other types of designers (WPF/Silverlight, ASP.NET)
You can access it via the Properties Window. There is a drop-down that will list all of the items in your form in design mode.
Then use the drop-down. The drop-down will list all of the items on your form so you will scroll through the list to find Button number 83.
Images were pulled from MS Visual Studio: The properties Window which contains an explanation of the window.
Have you tried using the properties window?
I have a custom task pane I've made in VSTO for Outlook 2007, but it needs a fair amount of screen real estate to be functional. I'd like to just take over the place of the Reading Pane, as it won't really be needed when this addon is active. It's also a really great spot since this addon relies on drag-and-drop from mail folders to this task pane, and the closer I can get it to the folder pane, the better.
Any way to replace the Reading Pane, or at least toggle it's visibility?
I dont think there is a way in OOM to do this .. I you can change the size of you region though.
I have seen it done though with add-in-express tool http://www.add-in-express.com but that may be 2 much work for you to change to that model.
Take a look at the Replacement or Replace All Form Region options. Both of these options allow to replace the display of form region.
The Replacement form region let's you build a custom first page of your own.
The Replace All form region let's you build all form pages.
These are not simple options as you must provide all Outlook capabilities the user expects. This is why the Adjoining form region option is the popular choice.
You can read more here:
http://msdn.microsoft.com/en-us/library/office/dd492010(v=office.12).aspx
http://msdn.microsoft.com/en-us/library/vstudio/bb206784.aspx