Skip to content

Exception: Exception calling "Publish" with "4" argument(s): "0x80042006" #149

@LynnXie00

Description

@LynnXie00

Bug

Failure to export to word, PowerShell gives an error saying "Exception: Exception calling "Publish" with "4" argument(s): "0x80042006""

Expectation

During the conversion, OneNote notes should be exported to Word and then converted to Md.

Discussion

The conversion worked well at the beginning, then this error alert started to happen for each document. After I turned off the codes, I found that there are many word processes opened in the task manager (I bet there are over 30 processes... see the image below). It is normal? Could it be the reason why this error occurs?

task manager screenshot

Environment

I am using Office 365 and use a notebook folder in onedrive, inside of it is the internet shortcut pointing to the onenote online. I tried to run the code in a local folder with .one files, but it won't work.

Output of Configuration

Configuration:
dryRun: 0
notesdestpath: C:\Users\verac\OneDrive\Documents\Notebooks
targetNotebook:
usedocx: 2
keepdocx: 1
docxNamingConvention: 1
prefixFolders: 1
mdFileNameAndFolderNameMaxLength: 200
medialocation: 2
conversion: markdown-simple_tables-multiline_tables-grid_tables+pipe_tables
headerTimestampEnabled: 1
keepspaces: 1
keepescape: 1
newlineCharacter: 2
exportPdf: 1

Output of $PSVersionTable

PS > $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.0.13
PSEdition                      Core
GitCommitId                    7.0.13
OS                             Microsoft Windows 10.0.22622
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Metadata

Metadata

Assignees

Labels

docsImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions