title: 'Convert OneNote to MarkDown' author:
!!! question Ready to make the step to Markdown and saying farewell to your OneNote, EverNote or whatever proprietary note taking tool you are using? Nothing beats clear text, right? Read on!
The PowerShell script 'ConvertOneNote2MarkDown.ps1' will utilize the OneNote Object Model on your workstation to convert all OneNote pages to Word documents and then utilizes PanDoc to convert the Word documents to Markdown (.md) format. It will also:
Windows >= 10
Windows PowerShell 5.1
Microsoft OneNote >= 2016
Microsoft Word >= 2016
PanDoc >= 2.7.2
Clone this repository to acquire the PowerShell script.
Start the OneNote application. All notebooks currently loaded in OneNote will be converted
Open a PowerShell terminal and navigate to the folder containing the script and run it:
'.\ConvertOneNote2MarkDown.ps1'
It will ask you for the path to store the markdown folder structure. Please use an empty folder.
Attention: use a full absolute path for the destination
Sit back and wait until the process completes
The script will log any errors encountered at the end of its run, so please review, fix and run again if needed. If you are satisfied check the results with a markdown editor like VSCode. All images should popup just right in the Preview Pane for Markdown files.
I would like to recommend this repository VSCodeNotebook to host your resulting Markdown Notes folder structure. This solution supports encrypting sensitive (markdown) files and works quite nicely.
While working with markdown in VSCode these are the extensions I like using:
.\code `
--install-extension davidanson.vscode-markdownlint `
--install-extension ms-vscode.powershell-preview `
--install-extension jebbs.markdown-extended `
--install-extension telesoho.vscode-markdown-paste-image `
--install-extension redhat.vscode-yaml `
--install-extension vscode-icons-team.vscode-icons `
--install-extension ms-vsts.team
NOTE: The bottom three are not really markdown related but are quite obvious.
Interesting forks have been developed you might want to take a look at. Especially the one for an Obsidian target made by @rab-bit.
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.