VB.NET to open contact from received email
VB.NET to open contact from received email
VB.NET to open contact from received email
VB.NET to open contact from received email
VB.NET to open contact from received email
VB.NET to open contact from received email VB.NET to open contact from received email VB.NET to open contact from received email VB.NET to open contact from received email VB.NET to open contact from received email VB.NET to open contact from received email VB.NET to open contact from received email VB.NET to open contact from received email
VB.NET to open contact from received email VB.NET to open contact from received email
VB.NET to open contact from received email
Go Back  Xtreme Visual Basic Talk > > > VB.NET to open contact from received email


Reply
 
Thread Tools Display Modes
  #1  
Old 05-18-2015, 01:18 PM
silenttalk silenttalk is offline
Newcomer
 
Join Date: Mar 2004
Posts: 4
Default VB.NET to open contact from received email


Hi

Pulling my hair over this one. very new to VS 2013 but have extensive background with outlook VBS/VBA coding.

We send emails out to a bunch of subscribers for a re booking situation for a membership system. Although we hold the subscribers current email address, they sometimes respond from an alternative (or Alias address) which then fails if we click through to the contact card in Outlook as it is not recognized). I developed a better method using VBS that embedded the Outlook 'Firstname' 'lastname' values in the message that they need to respond to. I then used this to hook a hypertext link to the contact locally such as <outlook:contacts/~fred blogs> which works fine, but some web mail systems i.e. Hotmail strip hyperlink from the reply email (presumably for security reasons). Hotmails Apps under Windows 8 and Outlook work fine though.

So i started developing an addin for out look with a form region on all email messages, simple two buttons on the form, open the contact that replied in the current email message and secondly move the message to a specific folder.

So i want to validate the Contact to open by text that i have embedded in the outbound email that they respond to, lets say 'Renewal Subscription for Fred Bloggs'

What i want the button I click in the form region to do is to parse the email of the current email and open the contact that resonds to 'Renewal Subscription for Fred Bloggs'.

i have code that works for a fixed contact as below but cant work out how to dynamically populate the Fullname variable :-

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim objOutlook As Outlook.Application
Dim fullname As String = "Fred Bloggs"
Dim objNS As Outlook.NameSpace
Dim objAddressList As Outlook.MAPIFolder
objOutlook = New Outlook.Application()
objNS = objOutlook.Session
objAddressList = objNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts)
'Find the contact by his full name
Dim objItems As Outlook.Items = objAddressList.Items
Dim objContact As Outlook.ContactItem = objItems.Find("[FullName] = '" & fullname & "'") 'ComboBox1.SelectedItem.ToString() & "'")
objContact.Display(True) 'calling this in modal or non modal makes no difference
objContact = Nothing
objItems = Nothing
objAddressList = Nothing
End Sub

Any help would be so gratefully received as i just cant seem to Google my way out of this, and a really nice guy from this forum helped me out 10 years ago 'Robb Dog'

here is hoping again

Matt
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
VB.NET to open contact from received email
VB.NET to open contact from received email
VB.NET to open contact from received email VB.NET to open contact from received email
VB.NET to open contact from received email
VB.NET to open contact from received email
VB.NET to open contact from received email VB.NET to open contact from received email VB.NET to open contact from received email VB.NET to open contact from received email VB.NET to open contact from received email VB.NET to open contact from received email VB.NET to open contact from received email
VB.NET to open contact from received email
VB.NET to open contact from received email
 
VB.NET to open contact from received email
VB.NET to open contact from received email
 
-->