- 27 Set 2017 às 10:13
#26817
Bom dia a todos,
estou fazendo um código para enviar imagem por email através de um macro, o meu problema é que não está carregando a imagem que quero, de preferência queria que fosse "upada" do meu pc, alguem pode me ajudar? desde já agradeço a todos.
segue o código que estou utilizando.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim OutApp As Object
Dim OutMail As Object
Dim texto As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
linha = ActiveCell.Row - 1
If Target.Address = "$P$" & linha Then
If Plan1.Cells(linha, 16) = "x" Then
texto = "<img src= http://www.protecbrasil.com/images/receba_footer.png>"
End If
With OutMail
.To = Plan1.Cells(linha, 15)
.CC = "sac@xxxxxx.com.br"
.BCC = ""
.Subject = "Precisamos da sua ajuda " & Plan1.Cells(linha, 13)
.Body = texto
.Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End If
End Sub
estou fazendo um código para enviar imagem por email através de um macro, o meu problema é que não está carregando a imagem que quero, de preferência queria que fosse "upada" do meu pc, alguem pode me ajudar? desde já agradeço a todos.
segue o código que estou utilizando.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim OutApp As Object
Dim OutMail As Object
Dim texto As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
linha = ActiveCell.Row - 1
If Target.Address = "$P$" & linha Then
If Plan1.Cells(linha, 16) = "x" Then
texto = "<img src= http://www.protecbrasil.com/images/receba_footer.png>"
End If
With OutMail
.To = Plan1.Cells(linha, 15)
.CC = "sac@xxxxxx.com.br"
.BCC = ""
.Subject = "Precisamos da sua ajuda " & Plan1.Cells(linha, 13)
.Body = texto
.Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End If
End Sub