+ Reply to Thread
Results 1 to 4 of 4

Upload signature when sending mail through Notes.

  1. #1
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Upload signature when sending mail through Notes.

    Hi.
    I have the following code that sends email and attached file but does not load automatically signing. Could anyone help me?
    Please Login or Register  to view this content.
    Thanks in advance!!
    "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.

  2. #2
    Registered User
    Join Date
    09-27-2012
    Location
    Milwaukee, WI
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Upload signature when sending mail through Notes.

    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

  3. #3
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: Upload signature when sending mail through Notes.

    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
    Attached Images Attached Images

  4. #4
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: Upload signature when sending mail through Notes.

    Hi.

    Any idea?


    Thank you!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1