Put Day of Year into Outlook Calendar

Post number 2 has been selected as the best answer.

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.)
 
Thread starter Similar threads 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
A Simply put:the office connector or the office outlook is not performing at all. Using Outlook 2
M Need to take names and email addresses from excel 2003 and put into outlook to email. Using Outlook 4
G .outlook calender,Put in a re occuring event and it blanks out the whole 24hr period. Using Outlook 1
D I do not want to receive msn.entertainment, msn.finances, msnnbc emails. They clog up my system. I also want to put a vacation notice on my Outlook Using Outlook 3
L Can not get Outlook to save e-mail account passwords. If I put passwords in manually system works fine, but when I close Outlook and reopen I have to Using Outlook 1
M Our internet was disconnected and then reconnected now outlook is asking for user name and password. What we put in does not work. Using Outlook 1
A Whats the maximun limit of email addresses i can put in the bcc line (Outlook 2003 SP2 with Exch 200 Using Outlook 1
N Put a shared distribution list into Address Book in Outlook 2007 Using Outlook 1
J I have set up outlook on my laptop and when I connected to my winmobile phone to sync all the mail was taken off my phone and put in outlook. Using Outlook 1
N How do I put the hotmail in my Microsoft outlook Using Outlook 4
C I get error msg in Outlook when trying to delete (and sometimes send)messages. It says to rung scanpst.exe put I have been unsuccessful in finding th Using Outlook 1
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
O How to put the most used folders in the Favorites Folders list? Using Outlook 2
T Need to build contact lists (put name / address / phone & fax numbers / pertinent info about contact & company), make notes (what spoke about Using Outlook 2
I Organizator of a Meeting is put in the Subject-Line of a ressource in a calendar Using Outlook 4
U I've had to create another Administrator file, because someone accedentily put a password onto my e-mail. I still can not recieve or send e-mails Using Outlook 2
D message from sender in Global Address List gets put in junk mail Using Outlook 2
D Trying to eliminate incoming email from being put into 'Large Mail' folder, even if it means editing registry to do so. Using Outlook 5
P Can I Assign Put a Public Folder on a Tasks's Update List? Using Outlook 5
K put CAS/HT/MB server on new IP/subnet Exchange Server Administration 4
J Whats the maximun amount of email addresses i can put in the bcc line? Using Outlook 1
M How do I reverse the POP3 set up and put e-mails back? Using Outlook 2
I this operation has been cancled due to restrictions in effect on this computer, i never put any restricons on ths box Using Outlook 0
K How do you put your Business Info (name, address, phone number) at the end of the email? Using Outlook 3
T I am trying to export my contacts to a csv to put on my smartphone. Using Outlook 2
G Favorite Folders issue-why won't my favorites stay put? Using Outlook 5
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
HarvMan Outlook 365 PST Report Using Outlook 0
V Upgraded Outlook Using Outlook 1
J Outlook 2010 Outlook/Win7 Client logging Event ID 36887 Using Outlook 0
R How to get the Items object of the default mailbox of a specific account in a multiple account Outlook? Outlook VBA and Custom Forms 0
T Why does outlook 2010 convert only some forum notifications to plain text? Using Outlook 2
M In Outlook Calendar remove the buttons: 'Today' and '<' (Back a day) and '>' (Forward a day) that are below the Ribbon and above the calendar display. Using Outlook 0
J Moved many emails to Outlook external folder, need to delete on Gmail server Using Outlook 13
P Scheduling a meeting in Outlook Outlook Wishlist 4
I Error saving screenshots in a custom form in outlook 2016, outlook 365 - ok in outlook 2013, outlook 2010 Outlook VBA and Custom Forms 5
R Outlook 2019 Using Outlook 0
N Outlook Has Become Sluggish Using Outlook 14
HarvMan Outlook 365 Calendar Using Outlook 12
A calendar invites sent from Microsoft Outlook to Mac Outlook is not working Calendar Printing Assistant 2
L Outlook 2016 Contacts missing in Outlook 365 Using Outlook 1
R seperate read layout to design in outlook 2016..Help!! Outlook VBA and Custom Forms 3
Similar threads


















































Top