When I run the following code I get the error "Unspecified failure has ocurred" (Run-time error '32002').Can anyone help me with this one?
MAPISession1.SignOn
' Send a fax with attachment
MAPIMessages1.SessionID = MAPISession1.SessionID
Dim Fax As String
Dim Nome As String
For Each nDestIndex In lstDestinatários01.ItemsSelected
' Dentro do report o cliente selecionado é usado como critério
txtDest = lstDestinatários01.Column(4, nDestIndex)
txtProcesso = lstDestinatários01.Column(0, nDestIndex)
Fax = lstDestinatários01.Column(3, nDestIndex)
Nome = lstDestinatários01.Column(2, nDestIndex)
DoCmd.OutputTo acReport, "Aviso de Entrega Destinatário", acFormatRTF, "c:\My Projects\Access\Alfadex\avent.doc", False
MAPIMessages1.Compose
MAPIMessages1.MsgSubject = "Aviso Entrega (Fedex)"
MAPIMessages1.MsgNoteText = ""
MAPIMessages1.RecipIndex = MAPIMessages1.RecipCount
MAPIMessages1.RecipType = mapToList
MAPIMessages1.RecipAddress = "FAX:+" & Fax
MAPIMessages1.RecipDisplayName = Nome
MAPIMessages1.AttachmentIndex = 0
MAPIMessages1.AttachmentType = mapData
MAPIMessages1.AttachmentName = "avent.doc"
MAPIMessages1.AttachmentPathName = "c:\My Projects\Access\Alfadex\avent.doc"
MAPIMessages1.AttachmentPosition = 0
MAPIMessages1.Send
Next
MAPISession1.SignOn
' Send a fax with attachment
MAPIMessages1.SessionID = MAPISession1.SessionID
Dim Fax As String
Dim Nome As String
For Each nDestIndex In lstDestinatários01.ItemsSelected
' Dentro do report o cliente selecionado é usado como critério
txtDest = lstDestinatários01.Column(4, nDestIndex)
txtProcesso = lstDestinatários01.Column(0, nDestIndex)
Fax = lstDestinatários01.Column(3, nDestIndex)
Nome = lstDestinatários01.Column(2, nDestIndex)
DoCmd.OutputTo acReport, "Aviso de Entrega Destinatário", acFormatRTF, "c:\My Projects\Access\Alfadex\avent.doc", False
MAPIMessages1.Compose
MAPIMessages1.MsgSubject = "Aviso Entrega (Fedex)"
MAPIMessages1.MsgNoteText = ""
MAPIMessages1.RecipIndex = MAPIMessages1.RecipCount
MAPIMessages1.RecipType = mapToList
MAPIMessages1.RecipAddress = "FAX:+" & Fax
MAPIMessages1.RecipDisplayName = Nome
MAPIMessages1.AttachmentIndex = 0
MAPIMessages1.AttachmentType = mapData
MAPIMessages1.AttachmentName = "avent.doc"
MAPIMessages1.AttachmentPathName = "c:\My Projects\Access\Alfadex\avent.doc"
MAPIMessages1.AttachmentPosition = 0
MAPIMessages1.Send
Next