What are all the possible types in an Outlook folder? - office-interop

I am trying to iterate through the Items collection of the Inbox folder of an account. What is the class of the Item if it is a NDR message?

ReportItem. You can see that object in OutlookSpy (I am its author): select the item, click Item button on the OutlookSpy ribbon.

Related

VSTO Outlook: Add new icon to the Outlook items shown in the explorer email list

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.

How to open Outlook Contact or Calendar from an email link or webpage?

Is it still possible to use Outlook URLs to open Open Outlook items such as Calendars or Contacts as per the below article...
How to open Outlook Calendar from an email link or webpage?
If you register the Outlook protocol like described in the Shortcuts and the Missing Outlook:// Protocol article you can open items.
You can link to a globally unique identifier (EntryID) that is created for an item and doesn’t change when you rename or move it:
Outlook:000000000EAE44133243899468AC478B31C0BANDHEWR324
It is best to use the GUID URL since you don’t have to worry about changes breaking the link. If you are after a outlook message, all you have to do is select that message in outlook, and then left-click on the linker icon on the lower right of the taskbar so that the link will get copied. Next, you will just have to paste it somewhere. It works the same way for contacts and even calendar events.

How do I create a custom Edit Contact form in Outlook 2016?

I'd like to be able to select a contact, and, either via right-click or a ribbon button, "Edit Advanced", which would take me to a form similar to the existing Edit Contact form but with some custom fields.
I'm thinking C# VSTO but I'm open to any solution that works.
Thanks in advance
What you need to do is change the MessageClass property of existing contacts (IPM.Contact) to the value of your custom form (e.g. IPM.Contact.Foo). So you will need to write a macro or add-in that will change this for all or selected items in any given folder.
There's a sample and tool available here: https://support.microsoft.com/en-us/help/201087/how-to-update-existing-items-in-an-outlook-folder-to-use-a-new-custom

How to delete custom form in Outlook 2013 using Outlook object model?

I created an custom form in Outlook 2013 named as "Service Request" and then it was published. Now to access the custom form a menu option is available under "New Items".
New Items---->Custom Form----->Service Request
I know the way to delete this menu item manually, by following the way
File--->Options--->Advanced---->Developer--->Custom Form--->Form Pattern
But my requirement is, need to delete the menu item programmatically using OOM in Outlook 2013.
Outlook Object Model does not allow to do that. You will need to use the IMAPIFormMgr MAPI interface (C++ or Delphi only)

Outlook 2010 Add-ins context menu on attachments

I am doing a development in C# - outlook ad-ins.
I want to modify the context menu for the attachment. In other words, you have a right click menu coming for each attachment.
I don't want on Mail Item.
I want on Mail Item > Item (Attachment)
I look forward for an answer.
Are you using Outlook 2007? There is an event that is raised when you click attachment right click:
Application.AttachmentContextMenuDisplay
You can work with that.

Resources