Hi.
I have the following code that sends email and attached file but does not load automatically signing. Could anyone help me?
Thanks in advance!!Please Login or Register to view this content.
Hi.
I have the following code that sends email and attached file but does not load automatically signing. Could anyone help me?
Thanks in advance!!Please Login or Register to view this content.
"No xadrez nem sempre a menor dist?ncia entre dois pontos ? uma linha reta" G. Kasparov.
If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select b from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.
This code works for me. In the MailDoc.Body line you need to type & stSignature after the message.
'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
'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 = ""
Recipient = Split(Addressee, ",")
MailDoc.sendto = Recipient
'MailDoc.Recipient = CopyTo
'MailDoc.copyto = ""
'MailDoc.Recipient = BlindCopyTo
'MailDoc.blindcopyto = ""
'MailDoc.Subject = Subject
MailDoc.Subject = ""
'MailDoc.Body = BodyText
MailDoc.Body = "Hello, Attached you will find a copy of your " & Format(Now() - 30, "mmmm") & " " & Format(Now() - 30, "yyyy") & " Shareholder Servicing Summary. If you have any questions, please contact your Relationship Manager. & stSignature
'MailDoc.SAVEMESSAGEONSEND = SaveIt
MailDoc.SAVEMESSAGEONSEND = True
'Set up the embedded object and attachment and attach it
Attachment = "C:\Share\SSS\Appleton.xls"
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
HI.
Thanks for the code but is not working ...
stSignature Maildb.GetProfileDocument line = ("CalendarProfile"). GetItemValue ("Signature") (0) variable stSignature not getting any value
Any other suggestions?
I do not know if it matters or not but my signature is a file saved in HTML
This code works when using it as a text signature ... knows how to play would be the signature saved in HTML?
Attached is a picture of how my signature is set
Hi.
Any idea?
Thank you!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks