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
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
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
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
KurtLass Opening Graphics Attachments in Outlook 2021 Using Outlook 0
P now on office 365 but getting error messages about missing Outlook 2013 cache folders Using Outlook 2
B Outlook config download Outlook VBA and Custom Forms 1
M Short term workaround for when Outlook searching stopped functioning Using Outlook 0
D Outlook 2016 Creating an outlook Macro to select and approve Outlook VBA and Custom Forms 0
L Fetch, edit and forward an email with VBA outlook Outlook VBA and Custom Forms 2
BartH VBA no longer working in Outlook Outlook VBA and Custom Forms 1
L Synch Outlook 365 calendar with iPhone Using Outlook 0
W Can vba(for outlook) do these 2 things or not? Outlook VBA and Custom Forms 2
S Outlook 2016 and Acrobat PDFMaker Office COM Addin Using Outlook 0
M "Attachment Detacher for Outlook" add in, does it update the server copy of the email? Using Outlook 1
M Outlook 365 Rename Outlook Priority Using Outlook 3
R Outlook 2019 accesses POP3 but says its offline (because of IMAP servers?) Using Outlook 0
R Outlook Working off line Using Outlook 0
D Outlook 365 Custom forms field limit? Outlook VBA and Custom Forms 4
W Outlook 2016 MSI - Possible to make work with O365 modern Auth & Win7? Using Outlook 4
T Outlook roaming signatures Using Outlook 4
S Adding a recipient's column to Sent folder in Outlook 2010 Outlook VBA and Custom Forms 1
J Outlook search bar in Office 2021 Professional Using Outlook 1
J PSA: How to create custom keyboard shortcut for "Paste Unformatted Text" in Outlook on Windows Outlook VBA and Custom Forms 1
C How to fix outlook continuing to prompt fo an Exchange password Using Outlook 0
C Outlook doesn't feel reliable, anymore Using Outlook 5
J Outlook 2016 Trying to get Outlook 2016 to work with Office 365 Using Outlook 0
C Outlook 365 Copy/Save Emails in Folder Outside Outlook to Show Date Sender Recipient Subject in Header Using Outlook 0
U Outlook not responding when trying to print Emails Using Outlook 5
O How to sync (one way) contacts between two Outlook (exchange) accounts? Using Outlook 0
S Sync Outlook (2021) tasks with Microsoft To Do Using Outlook 1
L Duplicate calendar entries in Outlook 365 Using Outlook 4
V Outlook 2021 Can anyone explain why my Outlook views keep changing?! Using Outlook 2
AlphonseG Outlook 365 Outlook Crashes on setting SaveSentMessageFolder Outlook VBA and Custom Forms 5
S Outlook 2021 How to customize colors Outlook 2021 & Office 2021 on PC Using Outlook 2
D Outlook 2007 Recovering E-Mails Using Outlook 0
G Stop Outlook 365 adding meetings to calendar Using Outlook 2
HarvMan Using Emojis in Outlook 365 Using Outlook 3
T Outlook 2019 Not Using Auto Compete After Deletion of 365 Using Outlook 1
D Gmail mail is being delivered to a different email inbox in Outlook App 2021 Using Outlook 2
Albert McCann Outlook 2021 Outlook Display of HTML Email from two senders is glitchy Using Outlook 0
richardwing Outlook 365 VBA to access "Other Actions" menu for incoming emails in outlook Outlook VBA and Custom Forms 0
J Unable to delete folders in Outlook 2019 / Windows Using Outlook 1

Similar threads

Top