OneNote 的怪事

发布于 2024-10-30 08:52:55 字数 445 浏览 4 评论 0原文

使用 OneNote 2010 执行一些 C# 互操作操作。观察到一些非常奇怪的行为,我认为这是故意的,但我不明白。

在 OneNote 选项中有一个用于保存和备份的部分。如果您转到 Windows 资源管理器中的“默认笔记本位置”文件夹并创建一个目录,它会自动在该目录中放置一个文件“Open Notebook.onetoc2”。

如果更改默认目录,这将不再起作用。不在新的默认目录中,也不在原始目录中。

奇怪的。更奇怪的是,如果您通过 onenote 本身在不同位置创建一个新笔记本,它还会创建“Open Notebook.onetoc2”文件,但它与自动创建的文件不同。我认为这是一个错误,今天花了我大约 4 个小时的时间。更糟糕的是,微软自己的 API 不支持这个文件。 UpdateHierarchy() 失败。

有人见过这个或者有任何解释吗?或者更好的是如何关闭这种行为?或者在哪里将其作为错误提交?

Using OneNote 2010 doing some C# interop stuff. Observing some very strange behavior, which I think is intentional but I dont get it.

In onenote options there is a section for save and backup. If you go to the folder for Default Notebook Location in windows explorer and create a directory, it will automatically put a file, "Open Notebook.onetoc2" in the directory.

If you change the Default directory, this no longer works. Not in the NEW default directory, or in the ORIGINAL one.

Strange. Even stranger is that if you create a new notebook in a different location through onenote itself, it also creates the "Open Notebook.onetoc2" file but it is DIFFERENT than the one autocreated. I think this is a bug, and it cost me about 4 hours of work today. Even worse, Microsofts own API does not work with this file. UpdateHierarchy() fails.

Anyone seen this or have any explanation? Or even better how to turn this behavior off? Or where to submit this as a bug?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

○愚か者の日 2024-11-06 08:52:55

好吧,想通了。这是我的错(像往常一样),不知怎的,我设法将默认笔记本位置(C:\ User \ username \ Documents \ OneNote Notebooks)添加为笔记本。所以它下面的任何东西实际上都应该是一个 SECTIONGROUP。

在更新我的层次结构时,我将其设置为并且它呕吐了。

Okay, figured it out. It was my fault (as usual), somehow I had managed to add the Default Notebook Location (C:\User\username\Documents\OneNote Notebooks) AS a notebook. So anything underneath it is in fact supposed to be a SECTIONGROUP.

While updating my hierarchy, I was setting it to and it pukes.

时光瘦了 2024-11-06 08:52:55

根据 Daniel Hölbling 的回答: http://www.tigraine.at/2009/09/01/howto-get-rid-of-onetoc2-files-using-powershell/
您可以通过首先导航到正确的顶级文件夹,然后执行以下 Powershell 命令来删除“onetoc2”文件:

Get-ChildItem -Filter "*.onetoc2" -Force -Recurse | Remove-Item –Force

确保在执行此操作之前已关闭 OneNote 笔记本。此外,请注意,这还将删除任何合法的 OneNote 目录,因此不要在任何合法的 OneNote 文件夹之上运行它!

According to Daniel Hölbling's answer here: http://www.tigraine.at/2009/09/01/howto-get-rid-of-onetoc2-files-using-powershell/
You can delete the "onetoc2" files by first navigating into the correct top-level folder, then performing this Powershell command:

Get-ChildItem -Filter "*.onetoc2" -Force -Recurse | Remove-Item –Force

Make sure that you've closed your OneNote notebook before you do this. Additionally, be warned that this will also delete any legitimate OneNote table of contents, so don't run it above any legitimate OneNote folders!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文