Getting messageID from email in Outlook VBA 2003 - vba

Is there a easy way to get the current shown (preferably selected) message-ID via VBA ?
without having to buy Redemption or some other package..
I need to message ID so I can make a link to a web-application that reads the mail and does some other stuff with it
Can't seem to use MAPI or PropertyAccessor in outlook 2003..

Do you mean the unique ID for the message? Try the EntryID Property:
ActiveExplorer.Selection.Item(1).EntryID
FYI PropertyAccessor was added in Outlook 2007, you wouldn't see it in 2003.

Related

VBA Outlook - Get "last modified by" using MAPI

I am using MAPI to get details of email into my database. Now it seems that outlook captures Last Modified time. But I am not able to find any helpful articles on how to capture the "last modified by" in outlook.
I need to know how I can achieve this using VBA Outlook with MAPI or if there is any other way of getting this done.
Extended MAPI can only be used from C++ or Delphi. There is no way you can do that from VBA.
Why do you need to use MAPI? Have you looked into using the Outlook Object Model and the MailItem.LastModificationTime property in particular?

MS Outlook MailItem as MIME message

I have been looking for some time for a way to get an Outlook MailItem as a MIME-Message, but without much luck so far.
What I found is this here: http://www.office-outlook.com/outlook-forum/index.php/m/600993/, which would mean that I would either have to use a third party library or get into Extended MAPI.
Is there no other way to get a complete MailItem as MIME in Outlook 2007 with VBA?
Yes, it is either Extended MAPI (IConverterSession) or Redemption (RDOMail/SafeMailItem.SaveAs).
You can of course explicitly built the MIME message in your code one property at a time...

vb.net addin outlook positem

I am working with vb.net addin outlook 2010. I have an exchange server 2003. We have a public folder that is used to store client emails. Our system send emails to clients and when they reply, it is saved in a public as a postItem not mailItem. I do not know how that happen.
I need to convert that postItem into mailItem because I want to start a workflow with that message.
I am able to get most of the field from PostItem, but I am not able to get CC and TO. I do not know what property from PostItem keep that information.
Are you actually copying data? HAve you tried to just reset the MessageClass property from IPM.Post to IPM.Note?
The Outlook PostItem does not have CC or BCC properties.
I just look at the MSDN reference and I don't see TO field either.
Here is the PostItem documentation:
http://msdn.microsoft.com/en-us/library/office/ff865387.aspx
Without seeing your code, I have no idea why your received email saves as PostItem.
Can you post the routine that saves to the public Exchange folder?

How to determine where a Mailitem is being opened from in Outlook 2007 using VSTO 2005 SE

I have an Outlook 2007 Add-in in VSTO 2005 SE that allows users to save e-mails into our document management system. From within our system users are able to open e-mails they have previously saved. However, when doing so I need to try and prevent them from saving them again.
I am trying to figure out how to determine if the Mailitem being opened is coming from the Outlook e-mail client or from an external source.
I know that normally the EntryId Property of the Mailitem is null or empty string when a Mailitem has not been previously saved in Outlook, however, it seems like when a Mailitem is being opened from within our system the EntryID is not null.
Adam,
Normally most DM systems set mapi properties or user properties on the mail items as they get saved ... DOCID etc. from the DM system. I would get outlook spy and hunt around on the DM emails to try and find this Property. Then you will be able to test for that in your VSTO add in. Failing that, may be you can explain how you open the email from you DM system is from inside outlook via a DM plug in ? or is it totally external app?
What DM System is it ?
Marcus

SMTP Headers in VB.Net without Redemption

I'm writing a mail component for a VB.Net app, and need to handle mails differently that are "Sent on Behalf" of someone. Although the Outlook Object Model exposes "SentOnBehalfOfName", it doesn't expose the email address for that party. Supposedly it's in the "OtherHeaders" field of the SMTP header, but I don't see an easy way to get to those through the Mailitem object. Am I missing something simple?
You could look up the name in AD or the GAL ?
or you could look up the PR_SENT_REPRESENTING_EMAIL_ADDRESS via a MailItem.PropertyAccessor id you are using 2007
our hacky workaround right now has been to construct a dummy reply. the reply-to field is populated based on the sentonbehalfof name, so then we can grab it and destroy the dummy. inelegant for sure, but it works