+ Reply to Thread
Results 1 to 2 of 2

I need a Macro that sends out email with one cells contents

  1. #1
    Registered User
    Join Date
    05-14-2019
    Location
    Provo, Utah
    MS-Off Ver
    2013
    Posts
    26

    Cool I need a Macro that sends out email with one cells contents

    I need to fix this code so that the body of the email texted out is actually the contents of Button!D44
    Not the actual text "Button!D44"

    this is hat I got
    Sub TexwhenDone()
    'Must add references (Tools > References) to
    ' 1) OLE Automation
    ' 2) Microsoft Outlook xx.0 Object Library
    Dim outlookApp As Outlook.Application
    Dim myMail As Outlook.MailItem
    Dim Source_File As String

    Set outlookApp = New Outlook.Application
    Set myMail = outlookApp.CreateItem(olMailItem)

    myMail.To = "[email protected]; [email protected] "
    myMail.HTMLBody = "<b>=Button!D44</b><br>"


    'myMail.Display True comment this out if you don't want to display email'
    myMail.send 'comment this out if you don't want to send yet

    End Sub

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,532

    Re: I need a Macro that sends out email with one cells contents

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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. [SOLVED] macro which sends email with attachment
    By robo_kk in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-30-2017, 07:21 AM
  2. macro that sends email
    By rhndrixxxx in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-04-2015, 04:42 PM
  3. Macro that sends a formatted email from Excel
    By suzannahdove in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-27-2014, 03:41 PM
  4. macro which sends email to few receipients with a standard message
    By megtoma in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-21-2014, 07:57 AM
  5. HELP! Need help with macro that automatically sends email when...
    By KngCharming in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-28-2013, 01:01 PM
  6. Macro that sends email automatically once a week?
    By GTfan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-27-2012, 02:44 PM
  7. A macro that looks up a email from sheet2 and sends email
    By AdderLee in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-10-2012, 02:24 PM

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