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

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
e_a_g_l_e_p_i Need clarification on 2-Step Verification for Gmail using Outlook 2021 Using Outlook 8
L Opening People Outlook 2021 Using Outlook 1
e_a_g_l_e_p_i Outlook 2021 not letting me setup my Gmail using pop Using Outlook 1
Geldner Problem submitting SPAM using Outlook VBA Form Outlook VBA and Custom Forms 2
P VBA to add email address to Outlook 365 rule Outlook VBA and Custom Forms 0
M Outlook 2016 outlook vba to look into shared mailbox Outlook VBA and Custom Forms 0
P Can no longer sync Outlook with iPhone calendar after iPhone update to 17.1.1 Using Outlook 2
O Outlook - Switch from Exchange to IMAP Using Outlook 0
e_a_g_l_e_p_i Is it possible to have a reminder in Outlook 2021 for every 90 days Using Outlook 3
farrissf Outlook 2016 Optimizing Email Searches in Outlook 2016: Seeking Insights on Quick Search vs Advanced Search Features Using Outlook 0
C Advanced search terms for "Outlook Data File" Using Outlook 1
N Reply to Outlook messages by moving messages to a specific Outlook folder Outlook VBA and Custom Forms 1
O How to find out the domain and server settings that my Outlook is using? Using Outlook 2
A Outlook 365 (OutLook For Mac)Move "On My Computer" Folder Items From Old To New Mac Computer Using Outlook 3
H Integrating Alexa & Outlook Pro 2021 Using Outlook 2
Z Automatically adjust Outlook Reading Pane from bottom to right depending on portrait or landscape window Using Outlook 1
Rupert Dragwater Background colors not saving in Outlook 365 Using Outlook 15
petunia Outlook tasks module sunsetting? Exchange Server Administration 3
G Save emails as msg file from Outlook Web AddIn (Office JS) Outlook VBA and Custom Forms 0
D Outlook VBA forward the selected email to the original sender’s email ID (including the email used in TO, CC Field) from the email chain Outlook VBA and Custom Forms 3
U Outlook 2021 not showing contact cards in Searches Using Outlook 1
C Outlook - Macro to block senders domain - Macro Fix Outlook VBA and Custom Forms 2
H Outlook 365 O365 outlook calendar item editing Using Outlook 1
J Outlook 365 html inline images Using Outlook 0
Rupert Dragwater How to get Outlook 365 to open from websites Using Outlook 5

Similar threads

Top