Diary Pages
Description | : | Create a page for each day in the selected month with date of the day as the title |
Download |
||||||
---|---|---|---|---|---|---|---|---|---|
Author(s) | : | Omer Atay, write2deepaks | |||||||
Category | : | Pages | |||||||
Last Updated | : | November 25, 2020 | |||||||
Requirements | : | OneNote 2010 or above | |||||||
Screenshot | : | ||||||||
![]() Diary Pages
|
|||||||||
Changelog | : | November 25, 2020 (7DB3E1) - Omer Atay February 20, 2017 (CE05B8) - Omer Atay December 25, 2016 (3C5DDA) - Omer Atay December 13, 2016 (BCD005) - write2deepaks |
will be an update availible for years after 2020?
Thanks
In the editor, if you expand the code snip While($i <= $Days) --the last section in the macro--, you'll find a section with While (Array_Length($ParagraphObjects_5) 0)
I combined three of these elements and I rearranged the order to get the page name that I wanted.
The elements I replaced were:
$ParagraphObject_4.text = (((($i + "-") + $Month) + "-") + $Year)
$ParagraphObject_4.text += " "
$ParagraphObject_4.text += ($DayNames[((($i - 1) + $Start) % 7)] + " ")
I deleted them all (Unfortunately I couldn't get them to just comment out :/) and replaced them with the below, which removes the year and some spaces, along with moving day of the week to the front.
$ParagraphObject_4.text += (($DayNames[((($i - 1) + $Start) % 7)] + " ") + (($i + "-") + $Month))
Note, though, that I also changed the months and days arrays to be only three characters for brevity. The above will only remove the year from the page name, but will display the Month and Day of week as it is displayed in your code.
1) Open OneNote and inside the "Home" toolbar menu open "Edit Macros" > "Diary Pages".
2) Edit 11th line of the code with the years you wish. For example:
DialogBox_AddDropDown($dialog_box, "Select &Year", "Year", $year, Array(2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031, 2032))
3) Edit 18th line of the code (the "If") line with the leap years. For example:
If (((($Month != "January") && ($Month != "February")) && (((($Year == 2016) || ($Year == 2020)) || ($Year == 2024)) || ($Year == 2028))) || ($Year == 2032))
4) Unroll the code under "If $Month == "February" and add the leap years, just like in the 3rd step. For example:
If ((((($Year == 2016) || ($Year == 2020)) || ($Year == 2024)) || ($Year == 2028)) || ($Year == 2032))
First of all thank you for this macro, as I tend to use it for the 3rd year of daily notes.
Second of all, do you have any plans of extending the date range above 2020?
I last ran this macro about 3 weeks ago with no issues; however, today when I'm running this macro it causes my OneNote to crash. I've re-downloaded and installed the latest version of OneTastic and the latest version of the Diary Pages macro, but the issue is unresolved. Any suggestions on what to try next?
Thank you for making our lives better.
I so love the auto-populate thing w/ this diary.
* Is it possible that every page made is the SAME DATE stamp as the title?
- this would be perfect for the OneCalendar if I would go to future dates and write an entry or something...
THANK YOU SO MUCH!
Thanks, jb