get attachment id from redemption or RDO MAil - outlook

I'm developping an outlook addIn using C# and I need to get attachment id from redemption or RDO MAil.
how's that?
Thank you

Outlook attachments (unlike messages) do not have unique ids since they only exist in the context of their parent messages.
PR_ATTACH_NUM property is used to open attachments - http://msdn.microsoft.com/en-us/library/office/cc841969.aspx.
But that property is not guaranteed to stay the same when a message is opened. More than that, the value of the PR_ATTACH_NUM property can differ depending on whether you retrieve it from the attachment table or from the attachment itself. Below is example from OutlookSpy (I am its author):
What exactly are you trying to do?

I was trying to replace attachment with a link in async callback method and I needed to detect which attachment to replace.
I used as flag the contentID of the Interop.Redemption.RDOAttachment Object and it worked fine, Thank you .

Related

Outlook attachment source file path

I am using Outlook.Attachment attachment object in my C# Outlook AddIn. But the attachment object doesn't have any field which suggest what is the full source path of the file being attached.
The attachment object has the following fields/methods, but they are not helpful.
attachment.DisplayName
attachment.FileName
attachment.GetTemporaryFilePath()
There is no such thing - attachment does not have to come from the file system even it is created. After its is inserted, it is stored outside of the file system alongside messages in the store.

Is it possible to get data of several selected mails inside an outlook web add-in app?

inside a Outlook COM Add-in (C#) I was able to retrieve all selected mails inside Outlook like this
var selection = Globals.ThisAddIn.Application.ActiveExplorer().Selection;
List<Outlook.MailItem> outlookMailList = new List<Outlook.MailItem>();
foreach (object mail in selection)
outlookMailList.Add((Outlook.MailItem)mail);
to store the selected mails with some meta data inside a DMS.
Now I would like to do the same with the Javascript API for Office (office.js).
What is the correct entry point here? Because when I select more than one mail inside Outlook the OutlookTab-buttons inside the default ribbon get deactivated.
see also http://bettersolutions.com/javascript-api/hosts/extensionpoint.htm
For retrieving the mail information I have found
selectedMail = Office.context.mailbox.item;
How can I get now the data for all marked mails in Outlook. I expected to have something like
selectedMails = Office.context.mailbox.items;
// OR
selectedMails = Office.context.mailbox.selectedItems;
Does someone know how to retrieve the information which mails were selected to the TaskPane or maybe a CustomPane? Respectively if it is even possible?
Thanks a lot.
Unfortunately Office JS API built for handling a single item. Handling multiple items is not possible.
If this is a new feature you want to include in the future, you may submit a feedback.
https://officespdev.uservoice.com/​
Best regards

Outlook AddIn - change the GlobalAppointmentId

Is there a way to change the GlobalAppointmentId of an appointment.
I found this property schema:
var globalIdPropertySchema = #"http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/00030102";
and I set a new value to it:
Item.PropertyAccessor.SetProperty(globalIdPropertySchema, MY_NEW_ID);
then when I get it using Item.PropertyAccessor.GetProperty I'm getting the new id, but the Item.GlobalAppointmentId is still the original one.
I'm needing this so that my addin can sync appointments using ICS files, our system sends ICS files with a suffix in the iCalendar UID field.
But it's possible to create appointments for our system through the Outlook AddIn, then the ICS file which is send uses the GlobalAppointmentID as the UID field in the ICS file. We store it, but it needs to have our suffix. Any tips?
You will need to completely release the appointment to make sure Outlook reloads it next time.
Do you see the change after you restart Outlook?

Enabling search on attachment names for email documents archived through IBM Content Collector

We need to be able to search on email attachment names (Name of the files attached to an email archived in FileNet through IBM ICC Microsoft Exchange email connector)
If we just enable CBR on the object store, we are able to search the text in attachment body but not the attachment names.
Another approach we thought of is to save the attachment names in a metadata property. But issue here is, we are not able to extract the attachment names in ICC. Please suggest any approach for this.
Could you check the filename in the content element of created document for attachment.
If the filename contains the original attachment name, you can copy this value into DocumentName property throught handler action or pre-processor action.

Getting _MailItem interface from IRDOMail

I've an Outlook plug-in. I'm using Redemption.
Specifically, I'm using IRDOMail::Move in order to move an email item from one folder to another (redemption is the only method I've found that work with all storages). I now have a need to get back a hold to the Outlook's _MailItem interface, while I only have a pointer to the redemption object. It appears Redemption works with MAPI (it is derived from), and what I need is the Outlook interface.
Thanks.
Use RDOMail.EntryID property to reopen the message as Outlook.MailItem using Namespace.GetItemFromID
IRDOMAIL::MAPIOBJECT will give you the underlying MAPI object. Perhaps you can use that not somehow navigate to the Outlook interface.
Redemption uses MAPI yes and it also aims to be a be a full replacement for CDO 1.21

Resources