Migrating from Outlook Notes

Migrating from Outlook Notes

There are plenty of decent note solutions around such as Evernote and (even better) OneNote. If you have a lot of notes stored in Outlook though, you may struggle to get them to OneNote (or Evernote) without have them as an attachment. This code can be used to read the contents of the note and send it as a message. Since those note programs typically have an email address where notes can be sent to, this can be an easy way of getting your notes from Outlook into your new program of choice.

$email = "me@onenote.com"

#Connect to Outlook
$Outlook = New-Object -ComObject Outlook.Application

#Connect to notes
$OutlookNotes = $Outlook.session.GetDefaultFolder(12)

foreach ($note in $outlooknotes.items)
{
$body = $note.body
$subject = $note.subject
$Mail = $Outlook.CreateItem(0)
$Mail.To = $email
$Mail.Subject = $subject
$Mail.Body =$body
$Mail.Send()
}

Advertisements

Leave a comment

Filed under Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s