I have an issue with the email freezing the application. The users have to ctrl-alt-delete to get out of it but it doesn't happen all of the time. I have attached the code used in the application. Is there any way to prevent it from freezing the program?
MAPISession1.LogonUI = True
MAPISession1.SignOn
With MAPMess
.SessionID = MAPISession1.SessionID
.Compose
.RecipAddress = GetEmail
.ResolveName
.MsgSubject = message
Index = 0
Set fldr = fso.GetFolder("C:\Files\"
For Each fle In fldr.Files
.AttachmentIndex = Index
.AttachmentPathName = "c:\Files\" & fle.Name
Index = Index + 1
Next fle
.Send
End With
MAPISession1.LogonUI = True
MAPISession1.SignOn
With MAPMess
.SessionID = MAPISession1.SessionID
.Compose
.RecipAddress = GetEmail
.ResolveName
.MsgSubject = message
Index = 0
Set fldr = fso.GetFolder("C:\Files\"
For Each fle In fldr.Files
.AttachmentIndex = Index
.AttachmentPathName = "c:\Files\" & fle.Name
Index = Index + 1
Next fle
.Send
End With