Menu ▾ ▴

#48 Evernote2Onenote COMException (0x80042004) while importing.

Fixed
None
Medium
Defect
2022-06-06
2015-03-17
No

While trying to import my notebooks into Onenote 2013, the application gives me the following error:

Note:"<note_name>"
System.Runtime.InteropServices.COMException (0x80042004): Exception from HRESULT: 0x80042004</note_name>

at Microsoft.Office.Interop.OneNote.IApplication.CreateNewPage(String bstrSectionID, String& pbstrPageID, NewPageStyle npsNewPageStyle)

at Evernote2Onenote.MainFrm.ImportNotesToOnenote(String folder, List`1 notesEvernote, String exportFile)

(the "<note_name>" indicates that the note's name is showed in that part)</note_name>

This error was a constant during my imports (2 of 3 notebooks). In one notebook it only showed 1 time, on the second one it showed more than 15 times. Needless to say that the note in question was not imported into Onenote.

So, any idea about which could be the cause of this error?

Thanks in advance.


System details:

OS: Windows 7 Ultimate SP1 x64
.NET Frameworks installed: v4.0.30319, v3.5, v3.0, v2.0.50727, v1.1.4322, v1.0.3705
Onenote version: 2013 (Office 2013 v15.0.4693.1002)
Evernote version: 5.8.3.6507 (274507)

Also, I attach 3 screenshots of the error (since the error was the same, and constant, it seems to me irrelevant to take mora screenshots than this ones).

3 Attachments

Discussion

  • Stefan Kueng

    Stefan Kueng - 2015-03-17

    that error code means "hrSectionDoesNotExist".
    Maybe the evernote note tag has some special char in it that OneNote does not allow to be part of a section name?

     
  • Araxhiel Khy

    Araxhiel Khy - 2015-03-17

    Well, what I can figure is that some tags are named with # character (as in C#), or as ".NET". But, if it is the case, I don't understand how some notes are giving the error, and some other does not.

    For the errors, depicted on the screenshots, the tags are showed on the following screenshots.

    Thanks

     
  • Stefan Kueng

    Stefan Kueng - 2015-03-17

    ok, yes: that seems to be the problem: OneNote section names can not have such chars in them. (try to create a section name manually in OneNote that has a '?' in it, and OneNote will tell you exactly which chars are not allowed).

    I'll fix this by either removing those chars before creating the section name, or maybe replace them with another (allowed) char.

     
    • Araxhiel Khy

      Araxhiel Khy - 2015-03-18

      Well, if that seems to be the problem, I can start changing my tags to avoid using characters that aren't allowed.

      Just a fun fact: Even if "#" isn't allowed, it seems that a tag with that character has been created after all :P

      Thanks for the help :D

       
  • Stefan Kueng

    Stefan Kueng - 2015-03-21
    • status: New --> Fixed
    • assigned_to: Stefan Kueng
     
  • sbcontt

    sbcontt - 2022-06-06

    So what is the accepted solution? I am getting this error on all 2401 of my notes. I do not have special characters in all of them, nor can I edit all of them even if I have special chars.

     

Log in to post a comment.