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: 340

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
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
B Outlook Notes Scroll Bars Outlook Wishlist 1
B Outlook Notes Scroll Bars Outlook Wishlist 0
J Outlook 2016 Can't display some embedded HTML images in Outlook 2016 Using Outlook 2
J Outlook EAS protocol version Using Outlook 1
N Outlook 2021 'Run Script" Rules? Outlook VBA and Custom Forms 4
C Why does Outlook (desktop) 365 for Windows keep making me input my passwords? Using Outlook 8
P Comcast IMAP broken but their second level support said to call "the Outlook company" Using Outlook 4
bdsermons Outlook 365 command button in outlook form Outlook VBA and Custom Forms 4
B iCloud telling me my Outlook is not supported Using Outlook 2
cheapfaremart Which outlook version is best? Using Outlook 0
T Outlook 2021 Cannot open attachments Outlook DeskTop 2021 Using Outlook 0
M Outlook settings will not accept a password Using Outlook 9
C Outlook FROM ADDRESS -Outlook.com and Android Using Outlook 1
E Outlook 365 Outlook/VBA Outlook VBA and Custom Forms 11
O How to find and replace a word in Outlook-Agenda-Subject and Message? Using Outlook 0
gproston Why doesn't Outlook remember indexing? Using Outlook 1
X Open Hyperlinks in an Outlook Email Message (Help with Diane's solution) Outlook VBA and Custom Forms 3
J Outlook 2003 .pst Will Not Restore Completely to Outlook 2019 Using Outlook 5
R Outlook Logging Using Outlook 6
e_a_g_l_e_p_i Email notifications changed with Outlook 2021 Using Outlook 8
Y Disable Microsoft Outlook Test Message Using Outlook 5
J Outlook 365 Outlook 2016/365 Contacts Lose Info when Favorited to the To-Do Bar Using Outlook 2
Commodore Are newer versions of Outlook still "less secure" to Google? Using Outlook 22
Commodore Any way to create "from-only" account on Outlook 2021? Using Outlook 1
Z Outlook.com OST Stopped working without explanation Using Outlook.com accounts in Outlook 3
glnz How to retrieve or redo Verizon.net email password without affecting Outlook connection? Using Outlook 1

Similar threads

Top