Jump to content
Fórum Script Brasil
  • 0

Carregar assinatura HTML no Lotus Notes

Carol Toledo


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



End If

'Set up the new mail document


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



'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 to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Forum Statistics

    • Total Topics
    • Total Posts
  • Create New...