![]() |
#1
|
|||
|
|||
![]() Hello again, I've written some code to autopopulate an email from word to outlook, however I want to add one last feature that adjusts the first line based on what time it is. If it's before 12 p.m. I want it to say good morning, between 12 p.m. and 5 p.m. to say good afternoon, and after 5 p.m. to say evening... However, I'm not sure how to incorporate a date function to create those 3 scenarios... anyone have any idea? |
#2
|
|||
|
|||
![]()
Oops. Found a good solution. Here it is:
Code:
Select Case Time Case Is < TimeValue("12:00") msg = "Good morning" Case Is < TimeValue("16:00") msg = "Good afternoon" Case Else msg = "Good evening" End Select |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
PPT Progress Bar based on Time not the # of Slides | The Dutchman | PowerPoint | 0 | 12-14-2016 09:59 AM |
filtering a list based clock time | DPD16 | Excel | 8 | 01-06-2016 03:29 PM |
Automatically Delete Slides based on current time | Pacman52 | PowerPoint | 2 | 07-16-2015 05:30 AM |
![]() |
Grahamers | Word | 1 | 05-13-2013 04:42 PM |
![]() |
akraw | Word | 3 | 03-26-2011 08:29 PM |