R
roots_of_culture
Hi all,
VB novice bear with me...
trying to build myself a template in Outlook to make life easier
I am aquiring multiple subtrings from the user and want to replce one
substring in a outlook template with multiple substring... but i get
an error!
For a = 1 To d
i = i + 1
AGMessage = "Enter the name of the agent in " + TLInput + "'s team:"
AGTitle = "Agent"
Select Case i
Case 1
AGInput1 = InputBox(AGMessage, AGTitle) 'AGInputx are the
substrings
Case 2
AGInput2 = InputBox(AGMessage, AGTitle)
Case Else
ErrorMessage = "Enter atleast one agent or do not send this email"
End Select
Next a
Set NewMail = objOLApp.CreateItemFromTemplate("G:\ak\shared12\Real
Time Traffic Management\Outlook\Templates\ContactedTL.oft")
NewMail.SentOnBehalfOfName = "Traffic Management"
NewMail.To = "Akarsh Shetty"
NewMail.Subject = "FOLLOW UP REQUIRED - " + AGInput1 + AGInput2 + "
require notification of change to their skill-set"
NewMail.HTMLBody = Replace(NewMail.HTMLBody, "Staff Member",
AGInput1) 'cannot figure out how to add more than 1 substring
thanks all
NewMail.Send
VB novice bear with me...
trying to build myself a template in Outlook to make life easier
I am aquiring multiple subtrings from the user and want to replce one
substring in a outlook template with multiple substring... but i get
an error!
For a = 1 To d
i = i + 1
AGMessage = "Enter the name of the agent in " + TLInput + "'s team:"
AGTitle = "Agent"
Select Case i
Case 1
AGInput1 = InputBox(AGMessage, AGTitle) 'AGInputx are the
substrings
Case 2
AGInput2 = InputBox(AGMessage, AGTitle)
Case Else
ErrorMessage = "Enter atleast one agent or do not send this email"
End Select
Next a
Set NewMail = objOLApp.CreateItemFromTemplate("G:\ak\shared12\Real
Time Traffic Management\Outlook\Templates\ContactedTL.oft")
NewMail.SentOnBehalfOfName = "Traffic Management"
NewMail.To = "Akarsh Shetty"
NewMail.Subject = "FOLLOW UP REQUIRED - " + AGInput1 + AGInput2 + "
require notification of change to their skill-set"
NewMail.HTMLBody = Replace(NewMail.HTMLBody, "Staff Member",
AGInput1) 'cannot figure out how to add more than 1 substring
thanks all
NewMail.Send