Exports local onenote notebooks in html directory format. I've personally used the resulting files to import into Trilium Notes with good success.
❗ Note: If you want to convert an online notebook, import it into your Microsoft Office version of Onenote first. |
---|
The bulk of the code was taken from @passbe's blog post. The main change in this repository is the handling of onenote sub-pages and sub-sub-pages. If you would prefer sub-pages and sub-sub-pages to be exported in the same directory use @passbe's blog post script.
The output of onenote-powershell-html-export.ps1 will look like the following. The script will export all notebooks, sections, pages, sub-pages, sub-sub-pages, and attachments:
Export Directory
└── notebook
└── section
├── page.htm
├── page
├── sub-page.htm
└── sub-page
└── sub-sub-page.htm
└── page_files
└── file.png
...
- Have powershell installed
- Open Onenote Desktop (Only Microsoft Office Versions of Onenote are supported by this script)
- Import notebooks if exported from OneNote web version
- Run the powershell script:
onenote-powershell-html-export.ps1
- Select your export directory.
- Watch yourself exit Microsoft's walled garden
- Check console for any errors (most can be ignored: see below)