Outlook Notes to OneNote (2010)

Status
Not open for further replies.

Ian Thomas

Senior Member
Outlook version
Outlook 2013 64 bit
Email Account
Outlook.com (as MS Exchange)
Using Outlook 2010, File>Options>Advanced>Export I can export my Outlook 2010 Notes to various formats, but this inbuilt function omits the relevant dates, last modified and created.
Is there some VBA code, or .NET VSTO or other code preferably, on which I can base a simple utility for myself to export all my Notes in one go?

This would be my first step in importing those OL notes to OneNote - and eventually to use OneNote entirely, so that I can sync with OneNote on OneDrive (SkyDrive) and use it for desktop and Windows Phone.

(I would expect that someone has done this already, but I can't locate any add-ins, code, or commercial applications to do this commonly-asked task)
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
print to onenote might keep the dates, but the notes are less usable as images. i'll see what i can find for exporting macros - i have one for journal items but i don't know if i can change it; what the solution might be is to use a macro to add the dates to notes before export. But i'll look at both methods.
 

Ian Thomas

Senior Member
Outlook version
Outlook 2013 64 bit
Email Account
Outlook.com (as MS Exchange)
print to onenote might keep the dates, but the notes are less usable as images. i'll see what i can find for exporting macros - i have one for journal items but i don't know if i can change it; what the solution might be is to use a macro to add the dates to notes before export. But i'll look at both methods.

I can't understand why there isn't a simple add-in for either Outlook or OneNote, to facilitate transition to OneNote.

My requirement is one-off. I have progressed a little, and I will add links and accurate attributions, and code - later. This may guide others who would like to do something similar.

The first stage of this small project is completed, which was to export the Notes to individual files on disk in RTF format. I used VBA's object model - rough enough for a start.

My code was derived as follows: directly copied from the VBA code originally shown by John Guin; modified 2010 by WJ Pommersheim (a few filters of filename disallowed characters); and I added a few more filename refinements myself, and changed writing individual text files for each Note to a similar iteration through the Notes but using SaveAs.

The SaveAs RTF export adds the modified date into the 'Body', and WJ Pommersheim wrote the Notes (.rtf) files into folders on disk, according to their Categories. I would have liked the Creation date as well (within the 'Body' of the RTF files).

I decided that the RTF format was best for my purposes, though I haven't investigated the other SaveAs types (OlSaveAsType enumeration is olHTML, olMSG, olRTF, olTemplate, olDoc, olTXT, olVCal, olVCard, olICal, and olMSGUnicode). olDoc may be more useful.

I am not sure whether I should have single 'pages' (ie, rtf disk files) or an aggregate. I think olDoc format would allow me to concatenate files more easily than olRTF.

My next small task is to import into OneNote. Perhaps I will modify the text importer (? again written by John Guin), or one of the Onetastic macros. I think that I want these individual Notes aggregated into a single notebook, as separate pages. Once into OneNote, I am hoping that the Onetastic macros can be used to do some formatting and rearranging.
 

Ian Thomas

Senior Member
Outlook version
Outlook 2013 64 bit
Email Account
Outlook.com (as MS Exchange)
Preliminary VBA code
 

Attachments

  • Module2.zip
    1.5 KB · Views: 376

Ian Thomas

Senior Member
Outlook version
Outlook 2013 64 bit
Email Account
Outlook.com (as MS Exchange)
An update:
I discovered that the VBA object model (Outlook 2010, 2007) - when using SaveAs with the olHTML constant - is not useful for my purpose, because it creates HTML that consists of the voluminous MSO style information and the file + File folder and its several files that MS Word and Internet Explorer save.
That complicates what is necessary for importing Notes into OneNote - which is clean HTML, with a couple of XML namespaces prepended up front.
I discovered a nice code sample for RTF to HTML conversion written by one of the Microsoft guys, Matthew Manela
(http://code.msdn.microsoft.com/Converting-between-RTF-and-aaa02a6e ) which works well - but requires use of the System.Windows.Controls.RichTextBox (ie, a UI component) which can load RTF/XAML from a stream and save it as XAML/RTF.
Its use of the RichTextBox is not convenient for the batch processing of hundreds of RTF files (exported from Outlook Notes).
So, I am still looking for a simple, clean RTF to HTML conversion routine.
The final stage - importing the HTML into OneNote - is a simple adaptation of the Text Importer PowerToy for OneNote 2010, courtesy of John Guin (also a MSFT guy).
http://blogs.msdn.com/b/johnguin/ar...r-powertoy-gets-updated-for-onenote-2010.aspx
Instead of importing plain text, and wrapping it in HTML tags, I will process the HTML files that are generated (conversion code tba) - prepending the XML namespaces for NewOutline and NewOutlineContent.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
R How to force Outlook to use plain text in notes for Contacts? Using Outlook 1
D Outlook Contacts Notes Field Photos to Smartphone Using Outlook 0
C Export NSF Lotus Notes files in Outlook PST format? Using Outlook 1
L dynamic and static dates in Outlook contact "notes" ie. body Using Outlook 2
M Outlook 2016: Changing default font for Notes and Reading Pane Using Outlook 4
P Synching Outlook 2013 Notes with iPhone 8 Using Outlook 1
J Syncing notes between Outlook 2016/Exchange and Outlook for Android Using Outlook 2
H Syncing Outlook notes with ios Using Outlook 3
S Outlook VBA Contacts Notes Outlook VBA and Custom Forms 0
George Simpson "Switch to HTML" in Outlook 2016 notes field Using Outlook 1
Diane Poremsky Outlook 2013 Notes have toolbars Using Outlook 0
D Outlook Notes and Exchange Sync Using Outlook 7
O Add private notes or comments to Outlook meeting invite Using Outlook 4
P mailto replication in Outlook Contact Notes Using Outlook 4
F Outlook 2010 Search Appointment Notes Using Outlook 0
C Outlook Custom Contact Form Attach Files in new notes fields Outlook VBA and Custom Forms 3
F This is currently a Lotus Notes app. Can Outlook / Exchange do this ? Using Outlook 3
C Outlook 2007 meeting invitations and Lotus Notes Using Outlook 0
M Access replicated Outlook (email folders, calendar, contacts, notes) via web Using Outlook 1
D Redemption? Need rapid pull of Outlook Contacts, email + notes for VBA Using Outlook 1
J Outlook 2003 - Tasks - Printing Notes Using Outlook 1
D Outlook Contact Notes show previous history with strike through. Using Outlook 1
F Foreign Accents in Outlook 2003 Tasks, notes and Calendar Using Outlook 4
M Sync Outlook 2010 Notes and Journal with iPhone 4 Using Outlook 1
L Outlook Contacts 2010 problem with Notes section configuration Using Outlook 22
G LinkedIn tab missing in Outlook 365 (but working in OWA) Using Outlook 0
J Outlook forgets "not junk" marking Using Outlook 0
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

Similar threads

Top