Excel - Pegar imagen de un archivo excel a contenido de texto

 
Vista:

Pegar imagen de un archivo excel a contenido de texto

Publicado por Tomas (1 intervención) el 11/09/2017 19:54:05
Hola a todos, soy nuevo en este tema, asi que busco ayuda con una macro que pega una imagen tomada de unas celdas de excel como contenido de un correo electronico.... Aqui esta el codigo que tengo, lastimosamente el contenido del correo queda en blanco aun cuando si logra copiar las celdas como imagen.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Sub Sendemail()
 
    Dim Content As Range
    Set Content = Worksheets("Report").Range("A6:C44"): Content.CopyPicture
 
    Dim EMAIL As Worksheet
    Set EMAIL = ActiveWorkbook.Worksheets("Report")
    Dim OutApp As Object
    Dim Correo As Object
 
    With Application
        .EnableEvents = False
        .ScreenUpdating = False
    End With
 
    'Check if Outlook is open, if not open it
    On Error Resume Next
    Set OutApp = GetObject("", "Outlook.Application")
    Err.Clear
    If OutApp Is Nothing Then Set OutApp = CreateObject("Outlook.Application")
    OutApp.Visible = True
    Set Correo = OutApp.CreateItem(0)
 
    'Create new mail and show it to the user
    With Correo
        .To = EMAIL.Range("B2").Value
        .CC = EMAIL.Range("B3").Value
        .Subject = EMAIL.Range("B4").Value
        .htmlBody = Pictures.Paste(Content).Select
        .Display
        '.SEND
    End With
    With Application
    .EnableEvents = True
    .ScreenUpdating = True
    End With
 
End Sub



Muchas gracias
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder