I have the following code that when I select one or more Tasks, it creates an email based on an email template to each contact that is the contact I created the Task to.....but, in the email, it shows up on the To bar, the name of the contact and not the full email address...and when I click on the name, it shows a list of the email and the tax number..and sometimes a phone number, and I have click on the email...so is there a way to have this code just go to and show the email, not anything else...thanks much:
Public Sub Task_Email ()Dim Session As outlook.NameSpace Dim currentExplorer As Explorer Dim Selection As Selection Dim obj As Object Dim objMsg As MailItem Set currentExplorer = Application.ActiveExplorer Set Selection = currentExplorer.Selection On Error Resume Next For Each obj In Selection If obj.Class = olTask Then Set objTask = obj Set objMsg = Application.CreateItemFromTemplate("C:\UsersUserName\AppData\Roaming\Microsoft\Templates\emailform1.oft") Set toTask = objTask.Links(1) With objMsg .To = toTask.Item .Subject = "From Name" .Display End With Set objMsg = Nothing End If Err.Clear Next Set Session = Nothing Set currentExplorer = Nothing Set obj = Nothing Set Selection = Nothing End Sub