我想利用以下的程式send email 給多個一個人及CC給其他人,但以下的程式只能send給一個人,我應如何寫才能做到呢?
(以下的程式都是在internet找到的)
(VB6.0, SP3,Outlook97)
Public Function OutLookMailto(OutLooks As Outlook.Application,ByVal strSubject As String, _
ByVal strText As String, colAddrList As Collection, _
colAttachments As Collection) As Boolean
Dim Mail As MailItem
Dim strTemp
Set Mail = OutLooks.CreateItem(olMailItem)
With Mail
For Each strTemp In colAddrList
.Recipients.Add strTemp
Next
For Each strTemp In colAttachments
.Attachments.Add strTemp 'Attach的File
Next
.Subject = strSubject
.Body = strText
.Save
.Send
End With
Set Mail = Nothing
OutLookMailto = True
Exit Function
Errh:
OutLookMailto = False
End Function