I have been trying to set custom tooltips for custom task pane buttons, that is, close button and down-arrow button. I have seen they already have a tooltip set by default but I would like to change it to show a custom text. Is that possible? or even is it also possible to change the tooltip style?
The Office/Outlook extensibility model doesn't provide anything for that. There is no trivial way to specify a tooltip for these controls. The CustomTaskPane interface doesn't provide any property or method for that.
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.
Using VSTO to create an Outlook Addin, with a custom ribbon and a Form Region.
When I click one of the custom buttons, the region is updated. I need the item (MailItem or AppointmentItem) to know it's been modified so a "do you want to save" dialogue pops up.
I see there is a Saved property, but it's readonly (see https://learn.microsoft.com/en-us/office/vba/api/outlook.mailitem.saved ) is there a way to safely trigger it without a hack (e.g. not item.Subject = item.Subject)
If you are using Outlook Object Model, modifying any property will mark the item as dirty. Are you not modifying the item?
BTW, resetting the Subject property might not be safe as it can wipe out the conversation id. You can reset the MessageClass property instead.
I have a Checkbox in my application, and it is meant to be checked, but also disabled. When disabled, I've noticed that the foreground of the checkbox as well as the content textbox are a darker color than when enabled. I would like to leave the checkbox disabled, but change the foreground of the content textbox to the same color as when the checkbox is disabled. How might I accomplish this?
Methed you have to learn how to edit your existing/default style of your control. I can't give you the exact which will work for your but you can use Blend or Visual Studio to edit a copy of a control's current template by right clicking on the control and then selecting Edit Style, Edit Template or Edit Additional Templates as appropriate. In the submenu, you can select Edit a Copy... which will present a window that allows you to create a copy of the default (or current template/stlye if you have already modified it) and customize it.
Here is a basic tutorial for this http://www.jeff.wilcox.name/2010/08/using-blend-to-find-default-style-xaml/
I've added a RichTextBox control to an Outlook Form Region as in this article. The problem is that there are no controls to edit the text size, color, etc. I just figured that the default context menu and ribbon would work with the RichTextBox control, but apparently I was mistaken.
What has to be done to hook these up? Is it even possible? If not, what other options are available?
I'm not sure if you can hook the existing Formatting tab in the ribbon to your custom RichTextBox, however you can easily add your own ribbon tab, and make controls for these. See here.
Another alternative could be to add your own ribbon style panel just above your RichTextBox, to make it more obvious to the user that those are the editing tools for that RTB.
This sounds like a trivial question, but it's proved quite hard to google anything about this.
When editing Color-typed properties through the property editor (when designing WinForms), a little editor pops up with three tabs: Custom, Web and System. I want to set a custom color by using the standard color picker dialog because none of the listed Custom colors are suitable.
I am sure that this used to be possible by double-clicking a blank color on the Custom tab, but this just picks the color being double-clicked and closes the drop-down in my VS2008. Am I imagining this, or did it really use to be possible? Can I do this in VS2008 somehow?
Right click on a blank colour in the palette shown by the custom tab. Brings up the "Define Color" dialog (in VS2008 C# Express, and I imagine the same in other versions).
EDIT - Having discovered this by experimentation, the MSDN library describes it here.
Interestingly, no keyboard-only interface is described.