• HTML email using Lotus Notes (2003 SP2)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » HTML email using Lotus Notes (2003 SP2)

    Author
    Topic
    #445711

    Has anyone been able to send a Lotus email using VBA which included a hyperlink in the body of the email and not have the email display the link as plain text?

    Viewing 1 reply thread
    Author
    Replies
    • #1081449

      Do you mean the link is coming across as plain text and you want it to be a link of the other way around. It’s a link and you want it to be plain text.

      If it’s the former: if you are editing the email, Lotus notes does not make the link active. With LN, the link is active only in a non editing mode – such as the sent document or the received document.

      I’ve never used Access to send an email using LN with a hyperlink in it. Do you have an example of the code, and I could try to reproduce your results?

    • #1081456

      (Edited by mbarron on 29-Oct-07 12:10. Added some white space after the DoCmd line)

      I used a SendObject of:

      DoCmd.SendObject acSendQuery, “Query1”, acFormatXLS, “AnyAddress@SomeDomain.com”, , , “Test of Send”, “Goto http://www.google.com”

      that displays the link as a link at my gmail accont and when I receive it in Lotus Notes. During the edit in Lotus Notes, the link is “dead”.

      One note – the http:// was necessary to make the link active when receiving in Lotus Notes. Without it, the link is not a link, only text.

      • #1081482

        Here is the code I have been using.

        Function SendLotusEmail()

        Dim Subject As String
        Dim Attachment As String
        Dim Attachment2 As String
        Dim Recipient As String
        Dim BodyText As String
        Dim SaveIt As Boolean
        Dim dbs As Database

        ‘This function will send a mail and attachment if neccessary to the recipient including the body text.
        ‘Requires that notes client is installed on the system.

        ‘Set up the objects required for Automation into lotus notes
        Dim Maildb As Object ‘The mail database
        Dim MailDoc As Object ‘The mail document itself
        Dim Attach1 As Object ‘The attachment object
        Dim Attach2 As Object ‘The second attachment
        Dim Session As Object ‘The notes session
        Dim EmbedObj As Object ‘The embedded object (Attachment)

        ‘Start a session to notes
        Set Session = CreateObject(“Notes.NotesSession”)
        Set Maildb = Session.GETDATABASE(“”, “”)

        ‘Set the message for the BodyText
        ‘BodyText = BodyText & vbCrLf
        BodyText = “THE ATTACHED FILES CONTAINS SENSITIVE CLIENT INFORMATION AND SHOULD NOT ” _
        & “BE SENT OUTSIDE OF PNC UNLESS ENCRYPTED. PNC HAS AN INTRANET SITE, ” _
        & “SecureExport, DESIGNED FOR END USERS TO SEND E-MAILS WITH ENCRYPTED ATTACHMENTS. THE ” _
        & “FOLLOWING IS THE LINK TO SecureExport:” _
        & “https://secureexport.abc.com/sswebsite/encrypt.nsf/mainform?OpenForm” _
        & “SecureExport IS A WEB-BASED FILE ENCRYPTION SERVICE THAT ALLOWS YOU TO ENCRYPT FILES IN JUST ” _
        & “A FEW EASY STEPS. IT IS IMPORTANT TO REMEMBER THAT FILE ENCRYPTION ONLY ENCRYPTS THE FILE ” _
        & “ATTACHMENTS, NOT THE E-MAIL TEXT.”

        Maildb.OPENMAIL

        ‘Set up the new mail document
        Set MailDoc = Maildb.CREATEDOCUMENT
        MailDoc.Form = “Memo”
        MailDoc.sendto = “charles.rau@pnc.com”
        ‘MailDoc.copyto = “”
        MailDoc.Subject = “Chart Reports”
        MailDoc.Body = BodyText
        MailDoc.SAVEMESSAGEONSEND = SaveIt

        ‘Attachment = “PPNWWS07VOL1GROUPPATOSTOP Technical Services” _
        & “MercantileBakery & Confectionery UnionPensionChart.pdf”
        ‘Attachment2 = “PPNWWS07VOL1GROUPPATOSTOP Technical Services” _
        & “MercantileBakery & Confectionery UnionHealthChart.pdf”

        ‘Set up the embedded object and attachment and attach it
        ‘Set Attach1 = MailDoc.CREATERITHTEXTITEM(“Attachment”)
        ‘Set EmbedObj = Attach1.EMBEDOBJECT(1454, “”, Attachment, “Attachment”)
        ‘Set Attach2 = MailDoc.CREATERICHTEXTITEM(“Attachment2”)
        ‘Set EmbedObj = Attach2.EMBEDOBJECT(1454, “”, Attachment2, “Attachment2”)

        ‘Send the document
        MailDoc.PostedDate = Now() ‘Gets the mail to appear in the sent items folder
        MailDoc.SEND 0, Recipient

        ‘Clean Up
        Set Maildb = Nothing
        Set MailDoc = Nothing
        Set Attach1 = Nothing
        Set Attach2 = Nothing
        Set Session = Nothing
        Set EmbedObj = Nothing
        Set dbs = Nothing
        MsgBox “Email sent”
        End Function

        • #1081483

          There is no space before or after the URL, this might make it too difficult for Lotus Notes to decide where the URL begins and ends.

          • #1081583

            Space made no difference. Oddly enough, when I forward the note to another Lotus mailbox the link is active.

            Our Lotus Notes Engineer is also looking into it, though he believes it is an Access issue.

            • #1081609

              I don’t think this has anything to do with Access. Your code uses the Lotus Notes API to generate an e-mail; this might as well have been done in Excel or in VB6. Only the data come from Access, but that has no bearing on whether an URL becomes a clickable link or not.

            • #1081629

              You may be right Hans. You know I am over my head here. I have found many are looking for a solution. I have searched the internet and other Access forums only to find similiar questions to mine with no solution at this point, but I will keep looking. If our Lotus Notes people find a fix I will post back.

            • #1081653

              HyperSpace…the final frontier. I was having issues sending to multiple recipients and in testing different syntax I added a semicolon to the end of the email address and low and behold my hyperlink is active.

            • #1081657

              Great! thumbup

    Viewing 1 reply thread
    Reply To: HTML email using Lotus Notes (2003 SP2)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: