You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33-13Lines changed: 33 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,10 +9,10 @@ The powershell script `ConvertOneNote2MarkDown-v2.ps1` will utilize the OneNote
9
9
10
10
## Summary
11
11
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.
12
13
* Choose to do a dry run or run the actual conversion.
13
14
* Create a **folder structure** for your Notebooks and Sections
14
15
* 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**
16
16
* Choose between creating **subfolders for subpages** (e.g. `Page\Subpage.md`) or **appending prefixes** (e.g. `Page_Subpage.md`)
17
17
* 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.
18
18
* 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.
162
162
163
163
### Q: Error(s) when opening OneNote as Administrator
164
164
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).
166
170
167
171
### Error: `Unsupported Powershell version`
168
172
@@ -176,16 +180,6 @@ Cause: Powershell `7.1.x` and above does not support loading Win32 GAC Assemblie
176
180
177
181
Solution: Use a version of Powershell between `5.x` and `7.0.x`. See [here](#q-how-to-install-and-run-powershell-70x).
178
182
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
-
189
183
### Error: `80080005 Server execution failed (Exception from HRESULT: 0x80080005(CO_E_SERVER_EXEC_FAILURE)`
190
184
191
185
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
200
194
201
195
### Error: `Exception calling "Publish" with "4" argument(s): "Class not registered"`
202
196
197
+
Cause: Microsoft Word is not installed.
198
+
203
199
Solution: Ensure Microsoft Word is installed.
204
200
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)"`
206
226
207
227
Cause 1: OneNote is not open during the conversion.
0 commit comments