Já revirei a internet tentando achar um código que ensinasse a inserir um link no corpo do email do lotus notes, e até agora não encontrei nada.
Aqui está o meu código do envio de email:
Public Sub EnviarEmail()
Dim Maildb As Object
Dim UserName As String
Dim MailDbName As String
Dim MailDoc As Object
Dim AttachME As Object
Dim Session As Object
Dim EmbedObj As Object
Dim SaveIt As Boolean = True
Dim Remetente As String = "Joaozinho"
Session = CreateObject("Notes.NotesSession")
'Get the sessions username and then calculate the mail file name.
'You may or may not need this as for MailDBname with some systems you can pass an empty string
UserName = Session.UserName
If InStr(1, UserName, " ") = 0 Then
MailDbName = UserName.Substring(1, InStr(1, UserName, "/") - 1)
MailDbName = "as_" & Replace(MailDbName, "CN=", "") & ".nsf"
Else
MailDbName = "as_" & UserName.Substring(3, 1) & UserName.Substring(InStr(1, UserName, " "))
MailDbName = MailDbName.Substring(0, (InStr(1, MailDbName, "/")) - 1) & ".nsf"
End If
'Open the mail database in notes
Maildb = Session.GETDATABASE("", MailDbName)
If Maildb.ISOPEN = True Then
Else
Maildb.OPENMAIL()
GoTo fimFunction
End If
Body = "(aqui entra o link) "
Assunto = " Teste "
Destinatario = "Rafaela"
Copia(1) = "Joao"
Copia(0) = "Maria"
MailDoc = Maildb.CREATEDOCUMENT
MailDoc.Form = "Memo"
MailDoc.sendto = Destinatario
MailDoc.copyto = Copia.ToArray()
MailDoc.Subject = Assunto
MailDoc.Body = Body
MailDoc.SAVEMESSAGEONSEND = SaveIt
MailDoc.FROM = Remetente
MailDoc.AltFrom = Remetente
MailDoc.SendFrom = Remetente
MailDoc.tmpDisplaySentBy = Remetente
MailDoc.tmpDisplayFrom_Preview = Remetente
MailDoc.DisplaySent = Remetente
MailDoc.FROM = Remetente
MailDoc.INetFrom = Remetente
MailDoc.Principal = Remetente
MailDoc.INetPrincipal = Remetente
MailDoc.PostedDate = Now()
MailDoc.send(0, Destinatario)
fimFunction:
Maildb = Nothing
MailDoc = Nothing
AttachME = Nothing
Session = Nothing
EmbedObj = Nothing
End Sub
Se alguém tiver alguma ideia de como inserir um link no email do lotus notes, qualquer coisa, já ajuda mesmo.
Pergunta
Rafaela Tamanhoni
Bom dia,
Já revirei a internet tentando achar um código que ensinasse a inserir um link no corpo do email do lotus notes, e até agora não encontrei nada.
Aqui está o meu código do envio de email:
Public Sub EnviarEmail() Dim Maildb As Object Dim UserName As String Dim MailDbName As String Dim MailDoc As Object Dim AttachME As Object Dim Session As Object Dim EmbedObj As Object Dim SaveIt As Boolean = True Dim Remetente As String = "Joaozinho" Session = CreateObject("Notes.NotesSession") 'Get the sessions username and then calculate the mail file name. 'You may or may not need this as for MailDBname with some systems you can pass an empty string UserName = Session.UserName If InStr(1, UserName, " ") = 0 Then MailDbName = UserName.Substring(1, InStr(1, UserName, "/") - 1) MailDbName = "as_" & Replace(MailDbName, "CN=", "") & ".nsf" Else MailDbName = "as_" & UserName.Substring(3, 1) & UserName.Substring(InStr(1, UserName, " ")) MailDbName = MailDbName.Substring(0, (InStr(1, MailDbName, "/")) - 1) & ".nsf" End If 'Open the mail database in notes Maildb = Session.GETDATABASE("", MailDbName) If Maildb.ISOPEN = True Then Else Maildb.OPENMAIL() GoTo fimFunction End If Body = "(aqui entra o link) " Assunto = " Teste " Destinatario = "Rafaela" Copia(1) = "Joao" Copia(0) = "Maria" MailDoc = Maildb.CREATEDOCUMENT MailDoc.Form = "Memo" MailDoc.sendto = Destinatario MailDoc.copyto = Copia.ToArray() MailDoc.Subject = Assunto MailDoc.Body = Body MailDoc.SAVEMESSAGEONSEND = SaveIt MailDoc.FROM = Remetente MailDoc.AltFrom = Remetente MailDoc.SendFrom = Remetente MailDoc.tmpDisplaySentBy = Remetente MailDoc.tmpDisplayFrom_Preview = Remetente MailDoc.DisplaySent = Remetente MailDoc.FROM = Remetente MailDoc.INetFrom = Remetente MailDoc.Principal = Remetente MailDoc.INetPrincipal = Remetente MailDoc.PostedDate = Now() MailDoc.send(0, Destinatario) fimFunction: Maildb = Nothing MailDoc = Nothing AttachME = Nothing Session = Nothing EmbedObj = Nothing End SubSe alguém tiver alguma ideia de como inserir um link no email do lotus notes, qualquer coisa, já ajuda mesmo.
Grata desde já.
Link para o comentário
Compartilhar em outros sites
4 respostass a esta questão
Posts Recomendados
Participe da discussão
Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.