从 C# 创建新的 One Note 2010 页面
我是一个相对的 c# 业余爱好者,我在跟上 Office Interop 的速度方面遇到了困难(如果我错了,请纠正我):
我想要一个控制台应用程序,可以在 One Note 中创建一个新页面2010。新页面将始终进入已存在的同一部分。页面标题将是 Windows 剪贴板中的字符串。我知道如何执行剪贴板部分(该程序还在指定路径中创建一个文件夹,并使用剪贴板中的字符串对其进行命名),但我在开始使用 One Note 部分时遇到了麻烦。
我一直在尝试理解这些文章(第二篇文章仅包含 VB 中的示例,因此我也必须处理该问题):
http://msdn.microsoft.com/en-us/library/gg649853.aspx
http://code.msdn.microsoft.com/windowsdesktop/OneNote-2010 -Create-New-880f8ee3
但我仍然基本上迷失了。我不需要找到任何部分或任何内容的名称,我知道我的新页面总是会进入一个名为“任务”的笔记本,位于一个名为“注释”的部分中,至少在第一个版本中/当我仍在学习时。
我正在寻找关于如何从 C# 创建新的 One Note 页面的精彩、集中的解释。 MSDN 文章假设了我不具备的各种先验知识,我宁愿快速开始并边做边学,而不是花一个月的时间阅读。一旦基本程序运行起来,我就会花很多时间调整它,这应该是一个很好的学习方式。
I'm a relative c# amateur, and I'm having trouble getting up to speed with what I guess is Office Interop (correct me if I'm wrong):
I want to have a console app that creates a new page in One Note 2010. The new page will always go into the same section, which will already exist. The page title will be a string in the Windows clipboard. I know how to do the clipboard part (the program also creates a folder in a specified path and names it using the string in the clipboard), but I'm having trouble getting started with the One Note part.
I've been trying to understand these articles (the second one has examples in VB only, so I also have to deal with that):
http://msdn.microsoft.com/en-us/library/gg649853.aspx
http://code.msdn.microsoft.com/windowsdesktop/OneNote-2010-Create-New-880f8ee3
But I'm still basically lost. I don't need to find the names of any sections or anything, I know that my new pages will always go into a notebook called Tasks in a section called Notes, at least in the first version/while I'm still learning.
I'm looking for nice, focused explanation of how to create a new One Note page from C#. The MSDN articles assume all sorts of prior knowledge that I don't have, and I'd rather get a jump start and learn by doing than spend a month reading. Once the basic program works, I'll spend lots of time tweaking it, which should be a great way to learn.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有关详细文章,请查看此 MSDN 杂志链接。
我使用那里的示例代码创建了一个快速片段,以便您在给定笔记本的给定部分中创建新页面。
如果您使用的是 Visual Studio 2010,本文中列出了一些“陷阱”:
For a detailed article, check out this MSDN Magazine link.
I used the sample code there to create a quick snippet for you to create a new page in a given section in a given notebook.
If you are using Visual Studio 2010, there are a couple of "gotchas" listed in the article: