Private Function EnviarMailAttach(v_para As String, v_asunto As String, v_mensaje As Variant, anexo As String, ruta As String)
'--- abro la sesion ---
MAPISession1.SignOn
MAPIMessages1.SessionID = MAPISession1.SessionID
'--- asigno los parámetros del correo ---
MAPIMessages1.Compose
MAPIMessages1.RecipDisplayName = v_para
MAPIMessages1.MsgSubject = v_asunto
MAPIMessages1.MsgNoteText = v_mensaje
'--- asigno parámetros de archivo adjunto ---
'MAPIMessages1.AttachmentIndex = 0
MAPIMessages1.AttachmentName = anexo
MAPIMessages1.AttachmentPathName = ruta
'MAPIMessages1.AttachmentPosition = 0
'MAPIMessages1.AttachmentType = 0
'MAPIMessages1.ResolveName
MAPIMessages1.Send
'--- cierro la sesion ---
MAPISession1.SignOff
End Function