+ Reply to Thread
Results 1 to 22 of 22

Auto Email Sent from Excel on a particular date without opening Excel

  1. #1
    Registered User
    Join Date
    05-23-2020
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    57

    Auto Email Sent from Excel on a particular date without opening Excel

    Hello All,

    I hope everyone is all right & doing well in this pandemic.

    I am into making some reminder file for something. Attaching sample file herewith. All i need to do is to send a mail having all data mentioned in respected column with heading and track sent reminder date in the same file.

    Need help to write macro which will perform this job without opening excel.

    Is it possible to have a macro which will also not open the outlook and send the mail?

    Thanks
    Attached Files Attached Files

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

    Re: Auto Email Sent from Excel on a particular date without opening Excel

    Quote Originally Posted by Darshan Shah View Post
    Need help to write macro which will perform this job without opening excel.
    It is not possible for an Excel macro to run if Excel is not open.

  3. #3
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Auto Email Sent from Excel on a particular date without opening Excel

    Although 6stringjazzer is correct, you can use windows scheduler to schedule the Excel file to open and then Excel can take some action based on that file opening. You can google that. Until then, populate this code in a module:

    Please Login or Register  to view this content.
    and this code in the "This Workbook" module

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by maniacb; 01-21-2021 at 10:26 AM.

  4. #4
    Registered User
    Join Date
    05-23-2020
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    57

    Re: Auto Email Sent from Excel on a particular date without opening Excel

    Thanks for your code maniacb!

    Found some error. Attaching herewith the screen shot.
    Attached Images Attached Images

  5. #5
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Auto Email Sent from Excel on a particular date without opening Excel

    The workbook module should be

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    05-23-2020
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    57

    Re: Auto Email Sent from Excel on a particular date without opening Excel

    Yes Working Fine

    Can we add our default signature as well?

    Thanks again.

  7. #7
    Registered User
    Join Date
    05-23-2020
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    57

    Re: Auto Email Sent from Excel on a particular date without opening Excel

    Quote Originally Posted by Darshan Shah View Post
    Yes Working Fine

    Can we add our default signature as well?

    Thanks again.
    I tried Signature as a string but VBA is only copying the text from default signature. Logo and font style is different. Any possible way?

  8. #8
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Auto Email Sent from Excel on a particular date without opening Excel

    Update the main module to this code to include the default signature

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    05-23-2020
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    57

    Re: Auto Email Sent from Excel on a particular date without opening Excel

    It's working like a gem. Default signature is attached well! Thanks for the code
    But when using HTMLBody, text are align and font style got changed to Times New Roman. I used "vbNewLine" as i have multiple lines in body. But using HTMLBody, text are getting aligned. Any other way out to solve this?

    Further, Can we make some text as Bold or font size can be increase?

    For Example, in body i want my description as below:

    Dear Sir,

    We have sent material on 24-01-2021 for Job work.

    Please update status of delivery. It should be deliver before 30-01-2021 (The font size of this date should be large).

  10. #10
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Auto Email Sent from Excel on a particular date without opening Excel

    You can use the code as follows, but the borders of the cell also show up in the email.

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    05-23-2020
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    57

    Re: Auto Email Sent from Excel on a particular date without opening Excel

    Yeah you are right! Not looking good

    That's the only way?

  12. #12
    Registered User
    Join Date
    05-23-2020
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    57

    Re: Auto Email Sent from Excel on a particular date without opening Excel

    And can we do that bold thing & font size thing in mail body?

  13. #13
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Auto Email Sent from Excel on a particular date without opening Excel

    Update the function to the following code. It will capture any formatting in the cell.

    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    05-23-2020
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    57

    Re: Auto Email Sent from Excel on a particular date without opening Excel

    Updated with this code but not getting bold font in mail body. Did i missed something?

  15. #15
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Auto Email Sent from Excel on a particular date without opening Excel

    Did you bold the txt in the cell before running the code?

  16. #16
    Registered User
    Join Date
    05-23-2020
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    57

    Re: Auto Email Sent from Excel on a particular date without opening Excel

    Yes. I Did.

  17. #17
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Auto Email Sent from Excel on a particular date without opening Excel

    Try it from this workbook. The bold comes through.
    Attached Files Attached Files

  18. #18
    Registered User
    Join Date
    05-23-2020
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    57

    Re: Auto Email Sent from Excel on a particular date without opening Excel

    Yes. Its working. Thank you.

  19. #19
    Registered User
    Join Date
    05-23-2020
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    57

    Re: Auto Email Sent from Excel on a particular date without opening Excel

    Hey maiacb!!

    Came back with just one more query regarding the same file. Can we add macro button to trigger the code?

  20. #20
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Auto Email Sent from Excel on a particular date without opening Excel

    Send Email Button has been added
    Attached Files Attached Files

  21. #21
    Registered User
    Join Date
    05-23-2020
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    57

    Re: Auto Email Sent from Excel on a particular date without opening Excel

    Thanks again Its working!

  22. #22
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Auto Email Sent from Excel on a particular date without opening Excel

    If that takes care of your original question, please select*Thread Tools*from the menu link above and mark this thread as SOLVED.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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] Auto email on opening an Excel File
    By buvanamali in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-11-2020, 03:30 PM
  2. [SOLVED] Excel VBA to Auto Send Email When a Date is Reached
    By SingularUK in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-05-2018, 02:47 PM
  3. Auto trigger an email from Excel on a specific date and criteria
    By prvnchdry in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-28-2017, 07:47 AM
  4. auto sending email before due date via excel 2003
    By AsifShabbir in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 03-02-2011, 09:00 AM
  5. Replies: 1
    Last Post: 02-16-2010, 03:02 PM
  6. auto paste/forward email to folder/excel/wordreceive from a particular email ID
    By tariqnaz2005 in forum Outlook Formatting & Functions
    Replies: 1
    Last Post: 10-22-2009, 06:31 PM
  7. Can Excel auto-send an email on a given date?
    By dannykray_z in forum Excel General
    Replies: 1
    Last Post: 04-18-2006, 02:43 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