+ Reply to Thread
Results 1 to 3 of 3

Macro to generate email, modify to update subject and body based on date

  1. #1
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,715

    Macro to generate email, modify to update subject and body based on date

    I have code to double click on a cell in Col D and an email is generated

    I need the code amended so that

    1) The subject shows Comms for May 2020 (see cell R1)
    2) Please find your comms payable in june 2020 amounting to …..


    Please Login or Register  to view this content.


    It would be appreciated if some could kind amend my code
    Attached Files Attached Files
    Last edited by Howardc1001; 06-09-2020 at 04:19 AM.

  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,696

    Re: Macro to generate email, modify to update subject and body based on date

    Your code is getting your dates from Target.Row but your sample file shows the dates in row 1. If you are really getting dates from Target.Row, as your code shows, make the following updates.

    If the dates are always in row 1, no matter where the user clicked, then you need to change Cells(Target.Row, "R").Value to Cells(1, "R").Value (same for the value in column S).

    Try this:
    Please Login or Register  to view this content.
    Last edited by 6StringJazzer; 06-09-2020 at 07:54 AM.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,715

    Re: Macro to generate email, modify to update subject and body based on date

    Thanks for the help, much appreciated

+ 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. Replies: 1
    Last Post: 08-05-2016, 02:33 PM
  2. vba pull data from outlook body of email through email or subject of mail into excel
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-01-2014, 04:37 AM
  3. need to have macro that emails the workbook, adds in subject and body to email
    By CityInspector in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-17-2013, 02:57 PM
  4. Replies: 0
    Last Post: 09-12-2013, 07:43 AM
  5. [SOLVED] Create macro to send worksheet as body of email using cells as subject line
    By LindaABH in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-16-2012, 07:43 PM
  6. Replies: 6
    Last Post: 12-02-2011, 02:14 PM
  7. Standard Email Macro connecting Body to Subject
    By jncswe in forum Outlook Programming / VBA / Macros
    Replies: 5
    Last Post: 02-23-2011, 06:28 PM

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