Mostrar mail antes de enviarlo

Hola........ 
buen dia. 
disculpa por la molestia; 
quisiera saber..... 
tengo una MACRO para enviar un mail, ya adaptada a mis necesidades, funciona de maravilla, pero quisiera que en lugar de enviar el mensaje con la funcion .SEND  
me la muestre, con .DISPLAY; para que me de tiempo de checar el Mail 
Este es mi codigo: 
Sub PRUEBA() 
 Dim AWorksheet As Worksheet 
    Dim Sendrng As Range 
    Dim rng As Range 
    On Error GoTo StopMacro 
    With Application 
        .ScreenUpdating = False 
        .EnableEvents = False 
    End With 
    'Fill in the Worksheet/range you want to mail 
    'Note: if you use one cell it will send the whole worksheet 
    Set Sendrng = Worksheets("IMAGEN").Range("A1:M32") 
    'Remember the activesheet 
    Set AWorksheet = ActiveSheet 
    'Create the mail and send it 
    With Sendrng 
        ' Select the worksheet with the range you want to send 
        .Parent.Select 
        'Remember the ActiveCell on that worksheet 
        Set rng = ActiveCell 
        'Select the range you want to mail 
        .Select 
        ' Create the mail and send it 
        ActiveWorkbook.EnvelopeVisible = True 
        With .Parent.MailEnvelope 
            ' Set the optional introduction field thats adds 
            ' some header text to the email body. 
            ' In the "With .Item" part you can add more options 
            ' See the tips on this Outlook example page. 
            ' http://www.rondebruin.nl/mail/tips2.htm 
            With .Item 
                .To = "[email protected]
                .Subject = Range("XFD1048576").Value 
                .SEND 
                MsgBox "MENSAJE ENVIADO EXITOSAMENTE!!!!" 
            End With 
        End With 
        'select the original ActiveCell 
        rng.Select 
    End With 
    'Activate the sheet that was active before you run the macro 
    AWorksheet.Select 
StopMacro: 
    With Application 
        .ScreenUpdating = True 
        .EnableEvents = True 
    End With 
    ActiveWorkbook.EnvelopeVisible = False 
End Sub 
Sub PRUEBA() Dim AWorksheet As Worksheet    Dim Sendrng As Range    Dim rng As Range 
    On Error GoTo StopMacro 
    With Application        .ScreenUpdating = False        .EnableEvents = False    End With 
    'Fill in the Worksheet/range you want to mail    'Note: if you use one cell it will send the whole worksheet    Set Sendrng = Worksheets("IMAGEN").Range("A1:M32") 
    'Remember the activesheet    Set AWorksheet = ActiveSheet 
    'Create the mail and send it    With Sendrng 
        ' Select the worksheet with the range you want to send        .Parent.Select 
        'Remember the ActiveCell on that worksheet        Set rng = ActiveCell 
        'Select the range you want to mail        .Select 
        ' Create the mail and send it        ActiveWorkbook.EnvelopeVisible = True        With .Parent.MailEnvelope 
            ' Set the optional introduction field thats adds            ' some header text to the email body.       
            ' In the "With .Item" part you can add more options            ' See the tips on this Outlook example page.            ' http://www.rondebruin.nl/mail/tips2.htm            With .Item                .To = "[email protected]"                .Subject = Range("XFD1048576").Value                .SEND                MsgBox "MENSAJE ENVIADO EXITOSAMENTE!!!!"                            End With        End With 
        'select the original ActiveCell        rng.Select    End With 
    'Activate the sheet that was active before you run the macro    AWorksheet.Select 
StopMacro:    With Application        .ScreenUpdating = True        .EnableEvents = True    End With    ActiveWorkbook.EnvelopeVisible = False    End Sub 
de antemano agradezco tu atencion.

1 Respuesta

Respuesta
-1
Enviando correo electrónico con el contenido de un documento de excel, usando Microsoft Outlook. Objeto MailEnvelope:
http://www.rondebruin.nl/mail/folder3/mailenvelope.htm
http://msdn.microsoft.com/en-us/library/aa167754%28office.11%29.aspx
Digo esto para aclarar a los que lean este hilo.
¿De quién es la macro de Fox o de Excel?
hola........ 
buen dia. 
disculpa por la molestia; 
quisiera saber..... 
tengo una MACRO para enviar un mail, ya adaptada a mis necesidades, funciona de maravilla, pero quisiera que en lugar de enviar el mensaje con la funcion .SEND  
me la muestre, con .DISPLAY; para que me de tiempo de checar el Mail 
Este es mi codigo: 
Sub PRUEBA() 
 Dim AWorksheet As Worksheet 
    Dim Sendrng As Range 
    Dim rng As Range 
    On Error GoTo StopMacro 
    With Application 
        .ScreenUpdating = False 
        .EnableEvents = False 
    End With 
    'Fill in the Worksheet/range you want to mail 
    'Note: if you use one cell it will send the whole worksheet 
    Set Sendrng = Worksheets("IMAGEN").Range("A1:M32") 
    'Remember the activesheet 
    Set AWorksheet = ActiveSheet 
    'Create the mail and send it 
    With Sendrng 
        ' Select the worksheet with the range you want to send 
        .Parent.Select 
        'Remember the ActiveCell on that worksheet 
        Set rng = ActiveCell 
        'Select the range you want to mail 
        .Select 
        ' Create the mail and send it 
        ActiveWorkbook.EnvelopeVisible = True 
        With .Parent.MailEnvelope 
            ' Set the optional introduction field thats adds 
            ' some header text to the email body. 
            ' In the "With .Item" part you can add more options 
            ' See the tips on this Outlook example page. 
            ' http://www.rondebruin.nl/mail/tips2.htm 
            With .Item 
                .To = "[email protected]
                .Subject = Range("XFD1048576").Value 
                .SEND 
                MsgBox "MENSAJE ENVIADO EXITOSAMENTE!!!!" 
            End With 
        End With 
        'select the original ActiveCell 
        rng.Select 
    End With 
    'Activate the sheet that was active before you run the macro 
    AWorksheet.Select 
StopMacro: 
    With Application 
        .ScreenUpdating = True 
        .EnableEvents = True 
    End With 
    ActiveWorkbook.EnvelopeVisible = False 
End Sub 
Sub PRUEBA() Dim AWorksheet As Worksheet    Dim Sendrng As Range    Dim rng As Range 
    On Error GoTo StopMacro 
    With Application        .ScreenUpdating = False        .EnableEvents = False    End With 
    'Fill in the Worksheet/range you want to mail    'Note: if you use one cell it will send the whole worksheet    Set Sendrng = Worksheets("IMAGEN").Range("A1:M32") 
    'Remember the activesheet    Set AWorksheet = ActiveSheet 
    'Create the mail and send it    With Sendrng 
        ' Select the worksheet with the range you want to send        .Parent.Select 
        'Remember the ActiveCell on that worksheet        Set rng = ActiveCell 
        'Select the range you want to mail        .Select 
        ' Create the mail and send it        ActiveWorkbook.EnvelopeVisible = True        With .Parent.MailEnvelope 
            ' Set the optional introduction field thats adds            ' some header text to the email body.       
            ' In the "With .Item" part you can add more options            ' See the tips on this Outlook example page.            ' http://www.rondebruin.nl/mail/tips2.htm            With .Item                .To = "[email protected]"                .Subject = Range("XFD1048576").Value                .SEND                MsgBox "MENSAJE ENVIADO EXITOSAMENTE!!!!"                            End With        End With 
        'select the original ActiveCell        rng.Select    End With 
    'Activate the sheet that was active before you run the macro    AWorksheet.Select 
StopMacro:    With Application        .ScreenUpdating = True        .EnableEvents = True    End With    ActiveWorkbook.EnvelopeVisible = False    End Sub 
de antemano agradezco tu atencion.
es de excel
Entonces favor referirse al grupo de expertos en tema de excel.

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas