Página 1 de 1

Exibir .Display - MACRO

Enviado: 24 Mar 2017 às 13:32
por KennedyMota
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



--

Já tentei alterar para .Display e não funcionou.

Exibir .Display - MACRO

Enviado: 28 Mar 2017 às 14:15
por wesleyribeiro123
KennedyMota
Boa tarde,

Não sei se entendi bem tua dúvida mas tente o seguinte.
Ao invés de utilizar .Display se referencie ao Objeto que vc quer exibir com .Visible = True

Exemplo:
noSession.Visible = True

Não sei se era bem esta tua dúvida, mas ai está minha contribuição!!!

Re: Exibir .Display - MACRO

Enviado: 28 Mar 2017 às 14:28
por KennedyMota
***
Obrigado pela resposta, mas agora estou preso em outra parte.

viewtopic.php?f=12&t=4401

Consegue me ajudar ? :D