Boa tarde Pessoal,
Preciso da ajuda de vocês... Vejam só.... achei algo pronto na internet que me ajudariam bastante a controlar abertura de chamados para meu setor... contudo, o código foi escrito todo para aplicação do Outlook.
Pergunto: Conseguiriam me ajudar adaptando ele para trabalho no notes?
Outra coisa... algumas informações no e-mail que serão encaminhados deverão ser "puxados" conforme informado em determinada célula, ou seja, poderá não ser o mesmo sempre.
'------------------------------------------------------------------------------------------------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim App 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 = "$F$" & linha Then
If Plan1.Cells(linha, 6) = "Concluído" Then
texto = "Prezado(a) " & Plan1.Cells(linha, 1) & "," & vbCrLf & vbCrLf & _
"A O.S. " & Plan1.Cells(linha, 7) & " aberta em " & _
Plan1.Cells(linha, 2) & " foi concluída." & vbCrLf & _
" Veja informações abaixo:" & vbCrLf & _
" Status: " & Plan1.Cells(linha, 6) & vbCrLf & _
" Ação tomada: " & Plan1.Cells(linha, 5) & vbCrLf & vbCrLf & _
"Atenciosamente," & vbCrLf & _
"Help Desk"
End If
With OutMail
.To = Plan1.Cells(linha, 1)
.CC = ""
.BCC = ""
.Subject = "Abertura de chamado"
.Body = texto
.Display 'Utilize Send para enviar o email sem abrir o Outlook
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End If
End Sub
Grande abraço.
Rogério