Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub Command1_Click()
SendEMail
End Sub
Private Sub Form_Load()
Dim itmX As ListItem
Dim i As Integer
For i = 0 To 5
Set itmX = LV1.ListItems. _
Add(, , "Hello" & i)
Next
End Sub
Public Sub SendEMail()
Dim strIniPath, strLine As String
Dim FSO, txtFile1
Set myOlApp = CreateObject("Outlook.Application")
Set myitem = myOlApp.CreateItem(olMailItem)
Dim i As Integer, s As String
For i = 1 To LV1.ListItems.Count ' - 1
s = s & LV1.ListItems(i) & vbCrLf
Next
myitem.Body = s
''
Set FSO = CreateObject("Scripting.FileSystemObject")
''this will add recipients from a text file
strIniPath = App.Path & "\Address.txt"
If FSO.fileexists(strIniPath) Then
Set txtFile1 = FSO.OpenTextFile(strIniPath, 1, False)
On Error GoTo ExitErr
Do While Not txtFile1.AtEndOfStream
strLine = txtFile1.readline
myitem.Recipients.Add (strLine)
Loop
End If
ExitErr:
''if you use a text file to add recipients, uncomment the next line
'txtFile1.Close
myitem.Display
''if you want to autosend, replace "Display" with "Send"
End Sub