'c# outlook addin - add custom flags or icons for emails [closed]
currently we can add some red flags to email. And after that, we can those flag icons to appear while listing of emails.
I want the similar thing to happen but I want a custom icon.
Is that possible.
Also it became really difficult to get support on c# outlook addin. Where can I get proper support ?
More details if you want:
I have already built an addin with forms and some actions etc. In outlook we can see list of emails. After clicking an email, we can click some buttons(like 'push to server'). Once clicked, the email will be stored in server and also will be moved to another folder. But we also need another functionality. We should be able to see some icons (like flags etc) in the email (or for each mailitem in the list of items like flags) that says whether it is already pushed to server.
Regarding what I have tried, I donno where to start, there is no online documentation for custom icons or flags(have been trying from days). To say clearly what I tried, in vs2013, Outlook.OlFlagIcon. - then vs2013 shows list of available flags, but there is no method like add.
Solution 1:[1]
I want the similar thing to happen but I want a custom icon. Is that possible.
No, it is not. Please read more about that on the add new colmn to view table in outlook forum.
Also it became really difficult to get support on c# outlook addin. Where can I get proper support ?
It depends on what kind of question you want to ask. If you develop a VSTO based add-in I'd recommend asking such questions on the Visual Studio Tools for Office VSTO forum (see MSDN forums). But if you are looking some help regarding the Outlook object model or common programming questions - the Outlook for Developers forum is the right place (see MSDN forums). But you are free to ask your question here also.
You can implement your task using choosing one of the following ways:
- Using categories. You can add your own categories in Outlook. See the Categories property of Outlook items for more information.
- Customizing the current view for adding a check box which can be bound to a custom property (user property). See the View class from the Outlook object model for more information. The check box will reflect the state - whether an item is uploaded to the server or not.
Solution 2:[2]
The only way to get a truly custom icon is to design and install your own form with a custom message class (e.g. IPM.Note.MyClass
) and associate it with your icon. If you set the MailItem.MessageClass
property appropriately, Outlook will show your icon.
You can also set the PR_ICON_INDEX
property to one of the predefined integer values (that's how Outlook shows the replied/forwarded icons) - you can play with it in OutlookSpy (I am its author): select a message with a replied/forwarded icon (so that PR_ICON_INDEX
is present), click IMessage icon on the OutlookSpy toolbar, double click the PR_ICON_INDEX
property to edit its value: there are a few dozen icons available, try values from 1 to 1000 or so, the ranges are not continuous, and the values are not documented of course.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Eugene Astafiev |
Solution 2 |