SjoerdV / ConvertOneNote2MarkDown

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!
GNU General Public License v3.0
212 stars 116 forks source link

Error while publishing file '[xxx]' to docx: Exception calling "Publish" with "4" argument(s): "Class not registered #3

Closed johnkyle4 closed 4 years ago

johnkyle4 commented 4 years ago

I'm getting errors like this:

[EDIT: I'm using OneNote 2016. I also have OneNote for Windows 10 installed. I followed all your directions, including Chocolately > Pandoc, and I'm running OneNote 2016 and PowerShell in administrator mode.]

Error while publishing file 'my doc.docx: Exception calling "Publish" with "4" argument(s): "Class not registered

Class not registered
"
couldn't unpack docx container: not enough bytes
Get-Content : Cannot find path 'C:\Users\John\Desktop\OneNote\File_Cabinet\-_Inbox\my_doc.md' because it does not exist.
At C:\Users\John\Desktop\ConvertOneNote2MarkDown-master\ConvertOneNote2MarkDown.ps1:192 char:19
+ ...           ((Get-Content -path "$($fullexportpathwithoutextension).md" ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\John\D...my_doc.md:String) [Get-Content], ItemNotFoundEx
   ception
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand

Error while renaming image file path references for file 'my doc': You cannot call a method on a null-valued expression.
SjoerdV commented 4 years ago

Hi John, thanks for your feedback. Please check this issue and follow instructions closely. The script is provided as is. https://github.com/SjoerdV/ConvertOneNote2MarkDown/issues/1

johnkyle4 commented 4 years ago

In case this helps anyone else, my error "Class Not Registered" was occuring because I didn't have MS Word installed.