Results 1 to 5 of 5

Thread: Choose A Salutation Based On Time Using VBA

  1. #1
    Member
    Join Date
    Aug 2011
    Posts
    54
    Rep Power
    13

    Choose A Salutation Based On Time Using VBA

    Hi,

    I would like to customize my macro-sent emails a bit. Instead of the generic "Hello" greeting, I'd like to have:
    Good morning,
    Good afternoon,
    and even Good evening,

    based on the time of day that I execute the macro.

    Also i want to incert my defalt signature in the mail.

    Plz help to get VBA code.

    Regards,

    Prabhu

  2. #2
    Senior Member alansidman's Avatar
    Join Date
    Apr 2012
    Posts
    125
    Rep Power
    13
    Suggest you post your VBA so that it can be determined how and where to place the necessary code. I am thinking that it will take a Case Select based upon the system time.

  3. #3
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,401
    Rep Power
    10
    For inserting signature, please look at http://www.excelfox.com/forum/f18/se...email-ids-304/
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  4. #4
    Member
    Join Date
    Aug 2011
    Posts
    54
    Rep Power
    13
    Hi Alan,
    Last edited by Prabhu; 10-26-2013 at 11:21 AM.

  5. #5
    Member
    Join Date
    Aug 2011
    Posts
    54
    Rep Power
    13
    Hi ALan,

    Plz find the workbook for your reference to insert salutation based on time (mail sent)

    Also I would like to point out two more issue am facing with this macro.
    I am using this macro to send the sheets(not workbook) as attachment to the specified mail id the VBA code.

    if the mentioned sheet not available in the workbook then macro gets stopped. Kindly help amend the VBA code as if the specified sheet is not available then it should move to the next command.

    Also I want to change the font, size and colour in the body of the email.(I preferred to send courier new with font size 11)

    Kindly do the needful.
    Prabhu
    Attached Files Attached Files

Similar Threads

  1. How To Change Date Based On Time Using Formula
    By Rajesh Kr Joshi in forum Excel Help
    Replies: 4
    Last Post: 08-03-2013, 11:03 PM
  2. Replies: 5
    Last Post: 05-28-2013, 03:00 AM
  3. Replies: 2
    Last Post: 04-16-2013, 01:36 PM
  4. Choose from several sheets
    By marreco in forum Excel Help
    Replies: 3
    Last Post: 08-29-2012, 02:46 AM
  5. Spreading a time range (shift time, etc) in columns.
    By Rajesh Kr Joshi in forum Excel Help
    Replies: 1
    Last Post: 08-23-2011, 11:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •