+ Reply to Thread
Results 1 to 2 of 2

adding and attachment and send on behalf of on lotus

  1. #1
    Registered User
    Join Date
    02-22-2017
    Location
    atlanta
    MS-Off Ver
    2003
    Posts
    1

    adding and attachment and send on behalf of on lotus

    Hi all,

    I worked on this code to be able to send email blast to my customers with individualized information. However im not sure how to add an attachment file (same for all emails) and i need this email to go out not from my personal email but from a shared email i have Access to. This is through lotus notes.

    Anyone that could give me a hand?

    Regards,

    CODE:
    Sub send_email()
    Dim sSignature, oWorksheet, oNotesSession, oMailDBName, oNotesMail, bDebug
    On Error GoTo 0
    Set oWorksheet = Application.ActiveWorkbook.Worksheets.Item(1)
    Set oNotesSession = CreateObject("Notes.NotesSession")
    bDebug = True
    Set oMailDB = oNotesSession.GETDATABASE("", "")
    If oMailDB.IsOpen = True Then
    If bDebug Then MsgBox ("Mail database for user " & sUserName & " is already open.")
    Else
    If bDebug Then MsgBox ("Opening mail database for user " & sUserName)
    oMailDB.OPENMAIL
    End If
    sSignature = oMailDB.GETPROFILEDOCUMENT("CalendarProfile").GETITEMVALUE("Signature")(0)
    iRow = 1
    Do While oWorksheet.Cells(iRow, 1).Value <> "" And iRow <= 300000
    If bDebug Then MsgBox ("Processing line " & iRow & ": " & oWorksheet.Cells(iRow, 6).Value)
    Set oNotesMail = oMailDB.CreateDocument
    oNotesMail.Form = "Memo"
    oNotesMail.SendTo = oWorksheet.Cells(iRow, 2).Value
    oNotesMail.Subject = "RMA Replacement Follow Up for " & oWorksheet.Cells(iRow, 1).Value
    oNotesMail.Body = "We show RMA " & oWorksheet.Cells(iRow, 6).Value & " pending to return, the expected part is " & oWorksheet.Cells(iRow, 8).Value & " a scheduled invoice for the full retail price will be generated if you fail to return the damaged part." & Chr(10) & " " & Chr(10) & "Should you have any questions please call us back at 1-800-800-9511 option 1 and refer to RMA " & oWorksheet.Cells(iRow, 6).Value & "." & Chr(10) & " " & Chr(10) & oWorksheet.Cells(iRow, 12).Value & vbCrLf & "" & Chr(10) & oWorksheet.Cells(iRow, 13).Value & vbCrLf & ""
    oNotesMail.SaveMessageOnSend = True
    Dim AttachME As Object
    oNotesMail.Attachment1 = "C:\Users\19018233\Desktop\Returns.jpg"
    If Attachment1 <> "" Then
    Set AttachME = MailDoc.CREATERICHTEXTITEM("attachment1")
    Set EmbedObj1 = AttachME.embedobject(1454, "attachment1", "C:\Users\19018233\Desktop\Returns.jpg", "") 'Required File Name
    End If
    oNotesMail.PostedDate = Now()
    oNotesMail.Send 0, oWorksheet.Cells(iRow, 2).Value
    Set oNotesMail = Nothing
    iRow = iRow + 1
    Loop
    If bDebug Then MsgBox ("Finished after processing " & (iRow - 1) & " lines.")
    Set oMailDB = Nothing
    Set oNotesSession = Nothing
    End Sub

  2. #2
    Valued Forum Contributor
    Join Date
    09-19-2008
    Location
    It varies ...
    MS-Off Ver
    Office365 - 64bit
    Posts
    862

    Re: adding and attachment and send on behalf of on lotus

    I'm not a lotus notes expert but I have some code from ages ago that has the following as the "embed attachment" bit:
    Please Login or Register  to view this content.
    Yours is similar but different:
    Please Login or Register  to view this content.
    I don't have Notes on this machine so can't test but thought it might help you work through it ...
    MatrixMan.
    --------------------------------------
    If this - or any - reply helps you, remember to say thanks by clicking on *Add Reputation.
    If your issue is now resolved, remember to mark as solved - click Thread Tools at top right of thread.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to send a worksheet as an attachment to lotus notes email
    By Thomas Andrews in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-13-2016, 11:30 PM
  2. VBA to send email via Lotus Notes + attachment
    By koodicoderi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-29-2013, 08:13 AM
  3. VBA Code: MACRO to send lotus notes email with excel attachment
    By FLani in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-31-2013, 10:23 AM
  4. Build and send Lotus Notes email with WS as attachment
    By Phiabell in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-17-2012, 09:36 AM
  5. Send an attachment through Lotus Notes
    By just_some_guy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-01-2010, 12:37 PM
  6. Send email on behalf in Lotus Notes
    By janworld in forum Access Programming / VBA / Macros
    Replies: 0
    Last Post: 06-09-2009, 04:49 PM
  7. Send Excel attachment via Lotus Notes
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-11-2006, 10:25 AM

Tags for this Thread

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