Este fórum está sendo desativado

Depois de 9 anos, este fórum será desativado. Mas calma.... estamos migrando para uma comunidade no DISCORD. Junte-se a nós.

ENTRAR PARA DISCORD

Tópicos relacionados a códigos VBA, gravação de macros, etc.
  • Avatar do usuário
Por KennedyMota
#21728
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.
Avatar do usuário
Por wesleyribeiro123
Posts Avatar
#21855
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!!!
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]

Estamos migrando para uma comunidade no Discord