Skip to content

Instantly share code, notes, and snippets.

@evenevan
Last active July 28, 2023 19:29
Show Gist options
  • Save evenevan/edc67e0cd32d2adf413dc48965e6cec8 to your computer and use it in GitHub Desktop.
Save evenevan/edc67e0cd32d2adf413dc48965e6cec8 to your computer and use it in GitHub Desktop.
Export OneNote notebooks

Introduction

I want to keep my OneNote notebooks from work/school for future reference or whatever. This gist documents two methods that worked for me with their advantages and caveats.

Guide

Method 1

This is probably the easiest, but may take a while and involves downloading a bunch of large notebooks onto your device. For me, I ran into issues with one specific notebook as noted by Mark and Stryderis.

Prerequisites

You will need the Microsoft 365 version of OneNote on a desktop computer for this method. Make sure it isn't the OneNote for Windows 10 version.

Steps

  1. Click on the File tab and open every notebook you want to save.
  2. With the first notebook selected, go to the File tab and look on the left for a tab named Export.
  3. In the export menu, select Notebook to export the current notebook and then pick the output format. Personally, I picked the .onepkg format. This is the best format if you want to view or edit a notebook OneNote in the future.
  4. Press the export button and pick an output location. Wait. It may take a few minutes for large notebooks.
  5. Repeat for each notebook that you want to save.
  6. Make sure you test your saves. See the next section for information on opening them.

Opening .onepkg

To open notebooks exported using this method in the .onepkg format, read on.

  1. In OneNote, within the File tab, find the Open tab.
  2. Click on browse.
  3. Make sure the file type selector in the bottom right is set to .onepkg.
  4. Fine your .onepkg notebook file.
  5. Click open.

Method 2

This method is what I eventually settled on to export my class notebooks. This will not work for personal notebooks. For those, you can use the first method. Overall, I find this method to be faster and easier if you have a lot of class notebooks as I do. This method also has the advantage of not polluting your device with a bunch of large notebooks, as all the processing and exporting is done in the Cloud™.

Prerequisites

You will need a personal Microsoft account, which will be used for some temporary (or permanent) storage space.

Steps

  1. Go to the OneNote section of the Microsoft 365 suite, sign in with your work/school email, and click on the Class Notebooks tab.
  2. Click on the three dots that appear when hovering over a notebook and press Save Copy.
  3. A window will pop up. Select the Save to a Microsoft Account option.
    • See the notes on the Save to your work/school account option.
  4. Sign in to your personal Microsoft account.
  5. When presented with the modal asking if you want to copy the notebook to your Microsoft Account, press Copy notebook.
  6. Repeat steps 2 to 5 for each notebook that you want to save.
  7. Head over to your personal OneDrive, sign in, and go the the Documents folder.
    • Do not access OneDrive via Windows Explorer. It will not work, as that only holds shortcuts, not the actual notebooks.
  8. Without selecting any of the notebooks, click the Download button at the top.
  9. Now, wait. Go get a coffee, overthrow a tyrannical government, and check in with the progress once in a while.
  10. A zip with every notebook you selected should be downloaded. Inside the zip, each notebook should be a folder.
  11. If you want, delete the OneNote notebooks from your OneDrive.
  12. Make sure you test your saves. See the next section for information on opening them.

Opening

To open notebooks exported using this method, read on.

  1. In OneNote, within the File tab, find the Open tab.
  2. Click on browse.
  3. Open the folder with the name of the notebook that you want to open.
  4. Inside, select the file named Open Notebook.onetoc2.
  5. Click open. You may get a prompt describing that a notebook could not be found at this location. Click Yes and continue.

Notes

  • As with all backups, please test the results by using the Open option in OneNote, if using a OneNote notebook format.
  • With method two, I couldn't get the Save to your work/school account option to work. I don't know why.

Credit

This gist is based on videos by Mike Tholfsen and GameCrafts, along with my own testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment