This macro will change the creation date of each page in the current section with the time the email was sent, allowing them to be sorted by the email date. This has been made specifically for emails sent to OneNote from Outlook.
Last Updated: February 11, 2018
Outlook Email Date Stamp
This Macro will change the page creation date to match the Sent date on the email. This will then allow you to use the Sort by Date macro regardless of when you moved the mail message to OneNote.
Email sent date is in a row in the table. The first column says 'Sent' in English, change that based on your language below. The second column has the date, provide the format for the date. This looks something like:
┌──────┬──────────────────────────────────┐
│ Sent │ Friday, February 9, 2018 7:05 PM │
└──────┴──────────────────────────────────┘
Legend for Date Format (examples use values from the date above)
Y: 4 digit year (2018) M: 2 digit month (02) D: 2 digit day (09)
y: 2 digit year (18) m: 1 or 2 digit month (2) d: 1 or 2 digit day (9)
H: 2 digit hour (07) T: 2 digit minute (05) W: Day of the week (Friday)
h: 1 or 2 digit hour (7) t: 1 or 2 digit minute (5) N: Month name (February)
A: AM or PM (PM)
?: Any 1 character (Useful for things like ?? for -th, -st, -nd, -rd suffixes)
For month and day names list short names below if that is the case (Jan,Feb,Mar,...)
Also use any other character directly as it appears like comma (,) or space ( )
To get 'Friday, February 9, 2018 7:05 PM', you would need 'W, N d, Y h:T A' as the date format