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
196 stars 113 forks source link

Error while publishing file 'xxx' to docx: Exception calling "Publish" with "4" argument(s): "Exception from HRESULT: 0x8004201A" #18

Closed projectje closed 2 years ago

projectje commented 3 years ago

(probably the same as https://github.com/SjoerdV/ConvertOneNote2MarkDown/issues/15 )

It crashes on a specific file that has (in onenote) 2 entries with the same name in the same section

Error while publishing file 'something_specific' to docx: Exception calling "Publish" with "4" argument(s): "Exception from HRESULT: 0x8004201A"

There are 2 md files, one with a _1, but the contents is identical which is not correct but this is because probably it continues after the catch. There is 1 word doc. I think the first one succeeds and then the second one somehow fails.

So the 2nd word document is raising the exception. I will place some more debug lines since in theory the word doc should be deleted at the end of the "for each page", so a new one, with a different page id can be written.

SjoerdV commented 2 years ago

@projectje I updated the script as mentioned in #23 (also referencing #15) to handle duplicate names appropriately. Could you please verify?