Ir para conteúdo
Fórum Script Brasil
  • 0

Carregar assinatura HTML no Lotus Notes


Carol Toledo

Pergunta

Boa tarde,

Tenho um código que funciona perfeitamente (envia e-mail, anexa arquivo e carrega assinatura desde que ela esteja em texto dentro do Lotus Notes) porém ele não carrega a assinatura em HTML.

Será que alguém conseguiria me ajudar?

Este é o código completo:

'Set up the objects required for Automation into lotus notes

Dim Maildb As Object 'The mail database

Dim UserName As String 'The current users notes name

Dim MailDbName As String 'THe current users notes mail database name

Dim MailDoc As Object 'The mail document itself

Dim AttachME As Object 'The attachment richtextfile object

Dim Session As Object 'The notes session

Dim EmbedObj As Object 'The embedded object (Attachment)

Dim stSignature As String

Sub nhe()

'Start a session to notes

Set 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

MailDbName = Left$(UserName, 1) & Right$(UserName, (Len(UserName) - InStr(1, UserName, " "))) & ".nsf"

'Open the mail database in notes

Set Maildb = Session.GETDATABASE("", MailDbName)

If Maildb.IsOpen = True Then

'Already open for mail

Else

Maildb.OPENMAIL

End If

'Set up the new mail document

Set MailDoc = Maildb.CREATEDOCUMENT

MailDoc.Form = "Memo"

'Attach Your Signature '<------

stSignature = Maildb.GetProfileDocument("CalendarProfile").GetItemValue("Signature")(0)

'MailDoc.Recipient = Recipient

'Addressee = ""

Addressee = "toledo.carolina@gmail.com"

Recipient = Split(Addressee, ",")

MailDoc.sendto = Recipient

'MailDoc.Recipient = CopyTo

'MailDoc.copyto = ""

'MailDoc.Recipient = BlindCopyTo

'MailDoc.blindcopyto = ""

'MailDoc.Subject = Subject

MailDoc.Subject = "teste notes"

'MailDoc.Body = BodyText

MailDoc.Body = "Hello, This is a test" & vbCrLf & stSignature

'MailDoc.SAVEMESSAGEONSEND = SaveIt

MailDoc.SAVEMESSAGEONSEND = True

'Set up the embedded object and attachment and attach it

Attachment = "C:\Users\ana_admin\Desktop\Dummy.txt"

If Attachment <> "" Then

Set AttachME = MailDoc.CREATERICHTEXTITEM("Attachment")

Set EmbedObj = AttachME.EmbedObject(1454, "", Attachment, "Attachment")

End If

'Send the document

MailDoc.SEND 0, Recipient

'Clean Up

Set Maildb = Nothing

Set MailDoc = Nothing

Set AttachME = Nothing

Set Session = Nothing

Set EmbedObj = Nothing

End Sub

Link para o comentário
Compartilhar em outros sites

0 respostass a esta questão

Posts Recomendados

Até agora não há respostas para essa pergunta

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.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,2k
    • Posts
      651,9k
×
×
  • Criar Novo...