Giter VIP home page Giter VIP logo

Comments (7)

 avatar commented on September 2, 2024 1

Got it. Need to install Word as well.

from convertonenote2markdown.

johnkyle4 avatar johnkyle4 commented on September 2, 2024 1

Yes, see these other Issues - #3 and #4 - "Class Not Registered" error will happen if you don't have MS Word installed. Also, you have to run both OneNote and PowerShell as Administrator or you will get errors

from convertonenote2markdown.

 avatar commented on September 2, 2024

BTW, great initiative. I really need this to move away from OneNote.

from convertonenote2markdown.

SjoerdV avatar SjoerdV commented on September 2, 2024

“~/export” Is not a valid path... please type a full and existing absolute path as target

from convertonenote2markdown.

 avatar commented on September 2, 2024

When using c:\export i get the same:

PS C:\Users\Toontje\ConvertOneNote2MarkDown> .\ConvertOneNote2MarkDown.ps1
Enter the (preferably empty!) folder path (without trailing backslash!) that will contain your resulting Notes structure. ex. 'c:\temp\notes': ~/export

Ton @ Sites - Company Inc


    Directory: C:\Users\Toontje\export


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----         7/7/2020   5:09 PM                Ton_@_Sites_-_Company_Inc
==============
## Customers
## Tech
--------------
### Quick Notes


    Directory: C:\Users\Toontje\export\Ton_@_Sites_-_Company_Inc


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----         7/7/2020   5:09 PM                Quick_Notes
#### Lab
Error while publishing file 'Lab' to docx: Exception calling "Publish" with "4" argument(s): "Exception from HRESULT: 0x80042006"
pandoc.exe: ~/export\Ton_@_Sites_-_Company_Inc\Quick_Notes\Lab.docx: openBinaryFile: does not exist (No such file or directory)
Get-Content : Cannot find path 'C:\Users\Toontje\export\Ton_@_Sites_-_Company_Inc\Quick_Notes\Lab.md' because it
does not exist.
At C:\Users\Toontje\ConvertOneNote2MarkDown\ConvertOneNote2MarkDown.ps1:192 char:19
+ ...           ((Get-Content -path "$($fullexportpathwithoutextension).md" ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\Ton Ma...ck_Notes\Lab.md:String) [Get-Content], ItemNotFoundEx
   ception
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand

Error while renaming image file path references for file 'Lab': You cannot call a method on a null-valued expression.
#### Company Wifi
Error while publishing file 'Company Wifi' to docx: Exception calling "Publish" with "4" argument(s): "Exception from HRESULT: 0x80042006"
pandoc.exe: ~/export\Ton_@_Sites_-_Company_Inc\Quick_Notes\Company_Wifi.docx: openBinaryFile: does not exist (No such file or directory)
Get-Content : Cannot find path 'C:\Users\Toontje\export\Ton_@_Sites_-_Company_Inc\Quick_Notes\Company_Wifi.md'
because it does not exist.
At C:\Users\Toontje\ConvertOneNote2MarkDown\ConvertOneNote2MarkDown.ps1:192 char:19
+ ...           ((Get-Content -path "$($fullexportpathwithoutextension).md" ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\Ton Ma...\Company_Wifi.md:String) [Get-Content], ItemNotFoundEx
   ception
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand

Can it be the @ sign that is causing the problem?

I also have a bunch of these errors:

Error while renaming image file path references for file 'Vanalles': You cannot call a method on a null-valued expression.
0
Error while publishing file 'Lab' to docx: Exception calling "Publish" with "4" argument(s): "Class not registered

Class not registered
"
Error while renaming image file path references for file 'Lab': You cannot call a method on a null-valued expression.
Error while publishing file 'Company Wifi' to docx: Exception calling "Publish" with "4" argument(s): "Class not registered

Class not registered
"
Error while renaming image file path references for file 'Company Wifi': You cannot call a method on a null-valued expression.
Error while publishing file 'JOIN WEBEX MEETING' to docx: Exception calling "Publish" with "4" argument(s): "Class not registered

Class not registered
"
Error while renaming image file path references for file 'JOIN WEBEX MEETING': You cannot call a method on a null-valued expression.
Error while publishing file 'Home network' to docx: Exception calling "Publish" with "4" argument(s): "Class not registered

Class not registered
"
Error while renaming image file path references for file 'Home network': You cannot call a method on a null-valued expression.
Error while publishing file 'Bettercap2' to docx: Exception calling "Publish" with "4" argument(s): "Class not registered

Any ideas? I really want to get this to work.

from convertonenote2markdown.

SjoerdV avatar SjoerdV commented on September 2, 2024

Hi @Toontje I still see the path '~/export' being used as your input parameter in your log, this will not work. use 'c:\export' and make sure the folder exists.

Could you please read the documentation again and make use of the other issues present in this repository. BTW all issues have been solved some way or another. The script in itself just works but maybe your system has security restrictions or compatibility issues preventing Windows10, Powershell, Pandoc, Word and OneNote form working together correctly. I do hope you figure it out.

from convertonenote2markdown.

martinandersen3d avatar martinandersen3d commented on September 2, 2024

Yes, see these other Issues - #3 and #4 - "Class Not Registered" error will happen if you don't have MS Word installed. Also, you have to run both OneNote and PowerShell as Administrator or you will get errors

@SjoerdV Please add to the REAMDE, that _ both need to run as Administrator_.
it works now, when BOTH run as admin. Thanks for a nice script :D

from convertonenote2markdown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.