
14/03/2006, 04:31
|
| | Fecha de Ingreso: mayo-2005
Mensajes: 93
Antigüedad: 20 años Puntos: 1 | |
Porque no utilizas Outlook??? No sería más sencillo??
Código:
Sub Send_Mails(PARA As String, TITULO As String, CUERPO As String, Optional ATTACH As Variant, Optional NOMBREATT As Variant, Optional CONC As String)
Dim appOutLook As Outlook.Application
Dim MailOutLook As Outlook.MailItem
'Enables automatic "YES" clicks for Outlook
Turn_Auto_Yes_On
'set variables for Outlook and a message
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
'Añadir las clausulas de privacidad del mail al cuerpo del mensaje
With MailOutLook
.To = PARA
.SUBJECT = TITULO
'.BodyFormat = olFormatRichText
.Body = CUERPO
If Not IsMissing(CONC) And CONC <> "" Then .CC = CONC
If Not IsMissing(ATTACH) Then
If ATTACH <> "" Then
.Attachments.Add ATTACH, olByValue, 1, NOMBREATT
End If
End If
If MsgBox("¿Desea enviar el siguiente e-mail?" & vbCrLf & "ASUNTO: " & TITULO & vbCrLf & "DESTINATARIO: " & PARA & vbCrLf & "CC: " & CONC, vbYesNo + vbQuestion) = vbYes Then
.Send
End If
End With
'Turns off the Auto_Yes program
Turn_Off_Auto_Yes
Set MailOutLook = Nothing
Set appOutLook = Nothing
End Sub
__________________ No te hubieran dado la capacidad de soñar sin darte también la posibilidad de convertir tus sueños en realidad |