Boa tarde!
Conseguem me ajudar com este código.
Preciso que ele exiba a caixa de dialogo para editar o email. (Uso LotusNotes). Mas neste caso ele esta enviando direto.
'envia o email para o operador
Dim noSession As Object, noDatabase As Object, noDocument As Object
Dim obAttachment As Object, EmbedObject As Object
Dim stSubject As Variant, stAttachment As String
Dim vaRecipient As Variant, vaMsg As Variant
'Retrieve the path and filename of the active workbook.
stAttachment = ActiveWorkbook.FullName
'Initiate the Lotus Notes COM's Objects.
Set noSession = CreateObject("Notes.NotesSession")
Set noDatabase = noSession.GETDATABASE("", "")
'If Lotus Notes is not open then open the mail-part of it.
If noDatabase.IsOpen = False Then noDatabase.OPENMAIL
'Create the e-mail and the attachment.
Set noDocument = noDatabase.CreateDocument
Set obAttachment = noDocument.CreateRichTextItem("stAttachment")
vaRecipient = Worksheets("Enviar").Range("E20")
vaMsg = Worksheets("Enviar").Range("E24")
'Add values to the created e-mail main properties.
With noDocument
.Form = "Memo"
.SendTo = vaRecipient
.Subject = "Erros - Siebel"
.Body = vaMsg
.SaveMessageOnSend = True
End With
'Send the e-mail.
With noDocument
.PostedDate = Now()
.Send 0, vaRecipient
End With
'Release objects from the memory.
Set EmbedObject = Nothing
Set obAttachment = Nothing
Set noDocument = Nothing
Set noDatabase = Nothing
Set noSession = Nothing
'Activate Excel for the user.
MsgBox "O E-Mail foi enviado com sucesso!.", vbInformation
End Sub
Postado : 22/03/2017 2:52 pm