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(AGMess age, AGTitle) 'AGInputx are the
substrings
Case 2
AGInput2 = InputBox(AGMess age, AGTitle)
Case Else
ErrorMessage = "Enter atleast one agent or do not send this email"
End Select
Next a
Set NewMail = objOLApp.Create ItemFromTemplat e("G:\ak\shared 12\Real
Time Traffic Management\Outl ook\Templates\C ontactedTL.oft" )
NewMail.SentOnB ehalfOfName = "Traffic Management"
NewMail.To = "Akarsh Shetty"
NewMail.Subject = "FOLLOW UP REQUIRED - " + AGInput1 + AGInput2 + "
require notification of change to their skill-set"
NewMail.HTMLBod y = 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(AGMess age, AGTitle) 'AGInputx are the
substrings
Case 2
AGInput2 = InputBox(AGMess age, AGTitle)
Case Else
ErrorMessage = "Enter atleast one agent or do not send this email"
End Select
Next a
Set NewMail = objOLApp.Create ItemFromTemplat e("G:\ak\shared 12\Real
Time Traffic Management\Outl ook\Templates\C ontactedTL.oft" )
NewMail.SentOnB ehalfOfName = "Traffic Management"
NewMail.To = "Akarsh Shetty"
NewMail.Subject = "FOLLOW UP REQUIRED - " + AGInput1 + AGInput2 + "
require notification of change to their skill-set"
NewMail.HTMLBod y = Replace(NewMail .HTMLBody, "Staff Member",
AGInput1) 'cannot figure out how to add more than 1 substring
thanks all
NewMail.Send
Comment