Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 688

Outlook Send Email to Listbox Name

$
0
0
I am new to VBA and have been searching google for an example close to my needs. I am wanting to create VBA script (to run in Outlook not Excel) to send an email template that has the email address and body already inputed. Once the name is selected from the listbox it will send the template.
I have been able to populate the list box and Send an email template but not the 2 together.

HTML Code:

Private Sub UserForm_Initialize()
'Creates and assigns the Array to the ListBox when the form loads. Dim mylist As Variant

mylist = Array("TEST", "Monday", "Tuesday", "Wednesday", _ "Thursday", "Friday", "Saturday") ListBox1.List = mylist

End Sub

Private Sub CommandButton1_Click() 'First Method: Displays individual selections one at a time. For x = 0 To ListBox1.ListCount - 1

  If ListBox1.Selected(x) = True Then
    MsgBox ListBox1.List(x)
  End If
Next x Unload Me

End Sub


Viewing all articles
Browse latest Browse all 688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>