Jump to content

xerxes_mama

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by xerxes_mama

  1. I have a spreadsheet for work that I have to use. We are expected to make some minor customizations for our individual facilities. I still can't figure out one thing in particular: how to put the text above the embedded spreadsheet in the Outlook email. 

    I've copied the code below. Any input would be great. 

     

    Sub CopyPasteEmail()

    Dim mailApp, mail As Object, lrow&, mrow&
    Dim olMailItem, wEditor As Variant
    Set mailApp = CreateObject("Outlook.Application")
    Set mail = mailApp.CreateItem(olMailItem)

    mail.to = (deleted for confidentiality)
    mail.cc = (deleted for confidentiality)
    mail.Subject = "Data for" & " " & Date

    mail.display

    mail.HTMLbody = "<p>Team,<br></br>Here is the list of metrics to be completed. These metrics must be completed prior to morning brief.</b><p> Please reach out to Safety if you have any questions.</p><h3>Who fills out the metrics?</h3><ul><li>Days 1-5 post event: Area Manager</li><li>Days 6-8 Post event: Ops Manager</li><li>Days 9-12 post event: Sr Ops Manager</li><li>Days 13-14 post event: GM/AGM</li>"

    Set wEditor = mailApp.ActiveInspector.wordEditor
    wEditor.Range(0, 0).Select

    Sheets("Open Cases").Range("A1:K10").Copy
    wEditor.Application.Selection.Paste


    End Sub

×
×
  • Create New...