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?
Related
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...
I have a SharePoint discussion board sycned to Outlook 2010.
I want to be able to programmatically modify my posts within a SharePoint Discussion Board within Outlook VBA and have these changes reflected on the online discussion board.
The below code works in a test case to modify the items on the Outlook side but it is not synchronizing with SharePoint.
Private Sub modifySharePointItem()
Dim obj As Outlook.PostItem
Set obj = Application.ActiveExplorer.Selection.item(1)
obj.Body = obj.Body + "test addition"
obj.Save
obj.Post
End Sub
I am assuming I need to not just Save and Post but an additional "synchronize" type command but I do not know what it is.
Reading about the data model for PostItem was basically useless unfortunately and none of the methods seemed to do what I was interested in.
I found out (by accident.....) I am able to delete posts from Outlook - so I can obviously get much of the way here, but I still am unsure how to sync the lists when items are modified.
You can use the Client Object Model to do modifications and editing in Sharepoint. I do it all the time. Since Outlook 2010 compiles down to the CLI you could use the Client Object Model dlls to do what you need. I have a whole bunch of C# code that I could share if you need it. This is what I used to get started.
http://msdn.microsoft.com/en-us/library/ee537247(v=office.14).aspx
I hope that helps!
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.
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
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