Skip to content

Error HRESULT E_FAIL has been returned from a call to a COM component. #146

@LynnXie00

Description

@LynnXie00

Bug

The code gives an error at line 570

[xml]$hierarchy = ""
$OneNoteConnection.GetHierarchy("", [Microsoft.Office.InterOp.OneNote.HierarchyScope]::hsPages, [ref]$hierarchy)

with the error saying "Error HRESULT E_FAIL has been returned from a call to a COM component."

Environment

Output of Configuration

Configuration:
dryRun: 0
notesdestpath: C:\00 OnenoteLocal\learning notes
targetNotebook:
usedocx: 2
keepdocx: 1
docxNamingConvention: 1
prefixFolders: 1
mdFileNameAndFolderNameMaxLength: 200
medialocation: 2
conversion: markdown-simple_tables-multiline_tables-grid_tables+pipe_ta
bles
headerTimestampEnabled: 1
keepspaces: 1
keepescape: 1
newlineCharacter: 2
exportPdf: 1

Output of $PSVersionTable

PS > $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.3.2
PSEdition                      Core
GitCommitId                    7.3.2
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