Put Day of Year into Outlook Calendar

Post number 2 has been selected as the best answer.

Status
Not open for further replies.

Chri3sss

New Member
Outlook version
Outlook 2019 64-bit
Email Account
Office 365 Exchange
Hi,

I'd like my Outlook O365 calendar to show the day number of the year for each day (e.g. today is 2/6/2020 so show "37 of 366" -as this is leap year) which is not a native function in Outlook.

I figured out the VBA code to calculate this. How can I get the results to show up for each day? Maybe a macro to insert a "not busy" appointment at 7:00 AM each day with the day number as the subject line?

Thanks,
Chris

In case anyone is interested the code is:

Sub DayOfYrCt()

Dim intDayNmbr As Integer
Dim dt As Date: dt = Date
intDayNmbr = DateDiff("d", CDate("1/1/" & Year(dt)), dt) + 1

Dim LongDaysInYr As Long
LongDaysInYr = 365 - (Year(dt) Mod 4 = 0) + (Year(dt) Mod 100 = 0) - (Year(dt) Mod 400 = 0)

'Debug.Print intDayNmbr; "of"; LongDaysInYr

End Sub
 
You need to either add an all day /not busy or insert it at a specific time.

This would be the subject - intDayNmbr; "of"; LongDaysInYr

and you need to loop through each day in the year.


Or... I have a HOL file that does this already. It create an all day event (because it uses the Holiday function.)
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
J Outlook 2010 does not let me put any account Using Outlook.com accounts in Outlook 3
R Outlook 2013 VBA I want to put the entire message to clipboard Using Outlook 5
H How do I import all my old email from Entourage 2004 (I have put email in separated folders), into my smart box of Outlook 2011 ? Thanks__ Using Outlook 2
S Macro to extract email addresses of recipients in current drafted email and put into clipboard Outlook VBA and Custom Forms 2
M Changing the preferred order for "Put this entry in" list for adding new contacts to the Address Book Using Outlook 1
M Retrieve data from GAL and put it in Clipboard Using Outlook 1
A Create Task from Email and put body & email as attachment into task notes Outlook VBA and Custom Forms 17
J Rule to put ONLY sent items in specific folder Using Outlook 1
R How do I create a macro to put text in certain emails? Outlook VBA and Custom Forms 1
M Grab info from attachment and put into SQL db Outlook VBA and Custom Forms 1
M How do I find Calendar events that have been put off with Snooze? Using Outlook 2
V What happens when "Resource" recipients are put in To/cc boxes? Outlook VBA and Custom Forms 3
C I don't understand Outlook or Microsoft, anymore Using Outlook 4
P My Feedback to Microsoft and their response; also New Outlook roadmap Using Outlook 0
A New Outlook - Cannot drag IMAP emails to Task List in MyDay Using Outlook 1
L Android Outlook Doesn't Update PC Notification Changes Using Outlook 0
A How to open Excel file saved in Outlook folder? Outlook VBA and Custom Forms 4
D.Moore Outlook desktop client suggested searches question Using Outlook 23
Y Outlook 2016 (64-bit) Copy Local Cal. Events to Another Cal. with Modified Reminder time Using Outlook 2
T Outlook 2019 While connecting an IMAP account in "classic" Outlook 2024 I caused a massive duplication of emails on the server (death loop) Using Outlook 5
D Cannot logon to Outlook.com, or outlook on Mac, outlook not updating on ipad, iphone Using Outlook 1
J unable to get my new install of Outlook to display mailboxes in the single-line format. Using Outlook 1
D Legacy Microsoft Outlook for Mac Support will end in Oct 2025 Using Outlook 5
C Nasty Bug Lurking In Outlook For Years. The Trigger. Any Fix Or Workaround? Using Outlook 11
R Auto clicking Hyperlink in outlook Outlook VBA and Custom Forms 7
ughlook Open multiple contacts in NEW Outlook? Using Outlook 3
G Outlook translation feature is off Using Outlook 2
P 3 of 5 PST files don't install from d:\outlook but only from D:\ Using Outlook 7
HarvMan January Windows 10 preview update force installs new Outlook Using Outlook 1
L Outlook 2010 - new installation on Windows 11 - aplzod32.dll is not a valid Add-in Using Outlook 12
J Outlook troubleshooting/logging - option grayed out Using Outlook 2
B Arrows missing from Outlook emails vertical scrollbar Using Outlook 0
G Outlook 2021 (New) doesn't respect default browser Using Outlook 9
B Outlook or iPhone turning tabs into spaces in Outlook Notes Using Outlook 1
P newly installed Office 365 includes OLD Outlook Using Outlook 6
R Outlook ribbon menu default? Using Outlook 7
H Spam email in Gmail not visible in Outlook Using Outlook 3
J How to transfer Win 10 Outlook to new Windows 11 pc? Using Outlook 16
J Renegade spam URL line displayed in old local Outlook 365 email title Using Outlook 3
G Reduce whitespace in Outlook desktop Contact Cards display Using Outlook 3
C Outlook classic via 365 Using Outlook 2
Dr. Demento Analogous Outlook code to read info into an array (or collection or whatever) Outlook VBA and Custom Forms 7
S Repair Outlook Using Outlook 8
V Outlook Form ListBox is not editable Outlook VBA and Custom Forms 2
F Outlook's contacts Using Outlook 1
D Outlook 2003 stopped dead Using Outlook 2
G Cannot receive emails from gmail account in Outlook 365 Using Outlook 1
E "Cannot display the folder. MS Outlook cannot access the specified file location" Using Outlook 8
P Outlook 2016 Working Offline Using Outlook 2
Rupert Dragwater Cannot reestablish gmail (email address) account in Outlook 365 Using Outlook 11

Similar threads

Back
Top