|
-
Jun 21st, 2000, 02:08 AM
#1
Thread Starter
Junior Member
HELP!
Could you pls tell me how i can send a msg with
several attachments? i've tried but i get an error msg
sending the second file.
This is my code:
Set objMapi = CreateObject("MAPI.Session")
If Not objMapi Is Nothing Then
objMapi.Logon profilename:=sProfile
End If
Set objMsg = objMapi.Inbox.Messages.Add
objMsg.Subject = sSubject
objMsg.Text = sMsg
'Sending files
If Not IsMissing(sFiles) Then
sFile = Split(sFiles, ";")
For i = LBound(sFile) To UBound(sFile)
Set objAttach = objMsg.Attachments.Add
With objAttach
'THIS IS WHERE I GET THE ERROR WHEN IT HAD'S THE SECOND FILE: (i=2)
.Source = sFile(i)
.Type = mapiFileData
.ReadFromFile sFile(i)
End With
Next i
End If
If you have any clue why this happens pls
reply.
thank you!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|