Variables passed into HTML from VBA for a boilerplate template
Also let me post some code snippetts that I have:
Sub AMS360_Online_DBExtraction()
Dim myOLApp As New Outlook.Application
Dim myOLItem As Outlook.MailItem
Dim txtToAddress As String
Dim txtOrderNumber As String
Dim txtAgency As String
Dim txtQID As String
txtToAddress = InputBox("Please insert in a To: email address", "To:")
txtOrderNumber = InputBox("Please insert in an order number.", "Order Number")
txtQID = InputBox("Please insert in the agency id.", "Agency QID")
txtAgency = InputBox("Please insert in the agency name.", "Agency Name")
Set myOLItem = myOLApp.CreateItemFromTemplate("U:\Outlook
Templates\360_DBExtraction.oft")
With myOLItem
..SentOnBehalfOfName = "CLL - AFW/AMS 360 Support"
..To = Trim(txtToAddress)
..BCC = "CLL - AFW-Online Data Center"
..Subject = " AMS360 Backup Completed | " & Trim(txtOrderNumber) & " | " &
Trim(txtAgency) & " | " & Trim(txtQID) & " | AMS360 Backup"
End With
myOLItem.Display
End Sub
I considered doing everything through the .HTMLBody method, but the HTML
code is essentially word "trash" code and I didn't want to have to clean it
all up if need be. What I would really like to do is define 4 ro so fields
as variables in the oft file that can be set via an input box variable upon
launch of the code...
I am not sure if that helps narrow it down somewhat, but hopefully it should.
|