Visual studio 2010, Outlook 2010 and Windows Application, Return Emails
At present I have wrote an application (in-house CRM, vb .net 2010) which allows me to send emails under the se开发者_StackOverflow中文版lected customer & I categorised these emails.
As these are categorised I can return data to display email history in my program by using search criteria:
Dim oMail As Outlook.MAPIFolder = oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderSentMail)
Dim sSearch As String sSearch = "[Categories] = '" + "[" + tAccount.Text.Trim + "]" + "(" + tShipTo.Text.Trim + ")'"
Dim oItems As Outlook.Items = oMail.Items.Restrict(sSearch)
However the limitation to the above is it only looks at sent items & no other folder. My ideal solution would be to display all email correspondence for a certain contact.
Could you please advise how I could add this feature to my program
I know this probably isn't quite what you were after but you could copy all emails into a sql database and query that instead ? Also tends to work much better if you have large numbers of emails to store/ manage.
精彩评论