Skip to content

Commit 015c065

Browse files
Merge pull request #158 from theohbrothers/docs/readme-add-note-that-only-notebooks-opened-in-onenote-can-be-converted-and-faq-on-errors-due-to-windows-defender-and-word-plugins
Docs (readme): Add note that only notebooks opened in OneNote can be converted, and FAQ on errors due to Windows Defender and Word plugins
2 parents ee0a277 + 78cd237 commit 015c065

1 file changed

Lines changed: 33 additions & 13 deletions

File tree

README.md

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ The powershell script `ConvertOneNote2MarkDown-v2.ps1` will utilize the OneNote
99

1010
## Summary
1111

12+
* Choose between converting a **specific notebook** or **all notebooks** in OneNote. Only notebooks which are [open and synchronized in OneNote](#q-some-notebooks-are-not-detected--converted) can be converted.
1213
* Choose to do a dry run or run the actual conversion.
1314
* Create a **folder structure** for your Notebooks and Sections
1415
* Process pages that are in sections at the **Notebook, Section Group and all Nested Section Group levels**
15-
* Choose between converting a **specific notebook** or **all notebooks**
1616
* Choose between creating **subfolders for subpages** (e.g. `Page\Subpage.md`) or **appending prefixes** (e.g. `Page_Subpage.md`)
1717
* Specify a value between `32` and `255` as the maximum length of markdown file names, and their folder names (only when using subfolders for subpages (e.g. `Page\Subpage.md`). A lower value can help avoid hitting [file and folder name limits of `255` bytes on file systems](https://en.wikipedia.org/wiki/Comparison_of_file_systems#Limits). A higher value preserves a longer page title. If using page prefixes (e.g. `Page_Subpage.md`), it is recommended to use a value of `100` or greater.
1818
* Choose between putting all media (images, attachments) in a central `/media` folder for each notebook, or in a separate `/media` folder in each folder of the hierarchy
@@ -162,7 +162,11 @@ To uninstall after your are done converting, simply delete the `C:\PowerShell-7.
162162

163163
### Q: Error(s) when opening OneNote as Administrator
164164

165-
A: If there are errors opening OneNote as Administrator, just open it normally without Admistrator permissions. A user has reported successful conversion with only Powershell opened as Administrator. See [case](https://github.com/theohbrothers/ConvertOneNote2MarkDown/issues/149#issuecomment-1418051753).
165+
A: If there are errors opening OneNote as Administrator, just open it normally without Administrator permissions. A user has reported successful conversion with only Powershell opened as Administrator. See [case](https://github.com/theohbrothers/ConvertOneNote2MarkDown/issues/149#issuecomment-1418051753).
166+
167+
### Q: Some notebooks are not detected / converted
168+
169+
A: The script cannot detect notebooks which are not yet open in OneNote. Use `File > Open` in OneNote to open all OneNote notebooks that you want to convert, and ensure they are all fully synchronized before running the conversion. This applies to local OneNote notebooks and cloud OneNote notebooks (E.g. OneDrive or Microsoft Teams).
166170

167171
### Error: `Unsupported Powershell version`
168172

@@ -176,16 +180,6 @@ Cause: Powershell `7.1.x` and above does not support loading Win32 GAC Assemblie
176180

177181
Solution: Use a version of Powershell between `5.x` and `7.0.x`. See [here](#q-how-to-install-and-run-powershell-70x).
178182

179-
### Error: `Exception 0x80042006`
180-
181-
Cause 1: Mismatch in security contexts of Powershell and OneNote.
182-
183-
Solution 1: Ensure both Powershell and OneNote are run under the same user privileges. An easy way is to run both Powershell and OneNote as Administrator.
184-
185-
Cause 2: `$notesdestpath` is not an absolute path.
186-
187-
Solution 2: Use an absolute path for `$notesdestpath`.
188-
189183
### Error: `80080005 Server execution failed (Exception from HRESULT: 0x80080005(CO_E_SERVER_EXEC_FAILURE)`
190184

191185
Cause: Mismatch in security contexts of Powershell and OneNote.
@@ -200,9 +194,35 @@ Solution: Ensure both Powershell and OneNote are run under the same user privile
200194

201195
### Error: `Exception calling "Publish" with "4" argument(s): "Class not registered"`
202196

197+
Cause: Microsoft Word is not installed.
198+
203199
Solution: Ensure Microsoft Word is installed.
204200

205-
### Error: `Exception calling "Publish" with "4" argument(s): "The remote procedure call failed. (Exception from HRESULT: 0x800706BE)`
201+
### Error: `Exception: Exception calling "Publish" with "4" argument(s): "Server execution failed Server execution failed"`
202+
203+
Cause: Microsoft Word plugin(s) causing publishing to `.docx` to fail. E.g. `zotero` plugin (see [case](https://github.com/theohbrothers/ConvertOneNote2MarkDown/issues/149#issuecomment-1418051753)).
204+
205+
Solution: Disable all Microsoft Word plugins before running the conversion.
206+
207+
### Error: `Exception: Exception calling "Publish" with "4" argument(s): "0x80042006"`
208+
209+
Cause 1: Mismatch in security contexts of Powershell and OneNote.
210+
211+
Solution 1: Ensure both Powershell and OneNote are run under the same user privileges. An easy way is to run both Powershell and OneNote as Administrator.
212+
213+
Cause 2: `$notesdestpath` is not an absolute path.
214+
215+
Solution 2: Use an absolute path for `$notesdestpath`.
216+
217+
### Error: `Exception calling "Publish" with "4" argument(s): "The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)"`
218+
219+
Cause: Windows Defender could be blocking `pandoc.exe`. See [case](https://github.com/theohbrothers/ConvertOneNote2MarkDown/issues/11#issuecomment-835081893).
220+
221+
Solution: Disable Windows Defender. Click `Start > Windows Security`, under `Virus and threat protection > Exclusions` click `Add or remove exclusions`, click `Add an exclusion` and browse to `C:\Program Files\Pandoc\pandoc.exe`. Then retry the conversion.
222+
223+
If `pandoc.exe` is still blocked, you might try to turn off settings under `Virus and threat protection`, `App and browser control`, and `Device Security`.
224+
225+
### Error: `Exception calling "Publish" with "4" argument(s): "The remote procedure call failed. (Exception from HRESULT: 0x800706BE)"`
206226

207227
Cause 1: OneNote is not open during the conversion.
208228

0 commit comments

Comments
 (0)