从Excel数据创建OneNote部分和页面 [英] Create OneNote section and pages from Excel data

查看:195
本文介绍了从Excel数据创建OneNote部分和页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人有一些VBA代码可以从Excel表格或OneNote本身的表格创建OneNote章节和页面吗?

Has anyone have some VBA code to create OneNote Sections and Pages from either an Excel table or a table in OneNote itself?

特别是我想要做的是开始使用两列表格;

Specifically what I would like to do is starting with a two column table;

列A          B栏

供应商A         零件号1

Supplier A         Part Number 1

供应商A         第2部分

Supplier A         Part Number 2

供应商B         零件号3

Supplier B         Part Number 3

供应商C         零件号4

Supplier C         Part Number 4

供应商C         零件号5

Supplier C         Part Number 5

供应商C         零件号6

Supplier C         Part Number 6

我想为A列中的每个供应商创建一个部分,并在每个部分下面创建相应的


部件号来自B栏的插件将作为页面插入。 

I would like to create a Section for each Supplier in Column A, and under each section the corresponding
part number from Column B would be inserted as a page. 

如果你可以选择onenote书来创建这个,就像John Guin的

calendar creator powertoy


onebooks在sharepoint上比硬编码UNC路径容易。

It be an added bonus if you can select the onenote book to create this in like in John Guin's calendar creator powertoy.
The onebooks are on sharepoint this would be easier than hardcoding the UNC path.

我精通VB / VBA,它是OneNote对象模型我正在努力。非常感谢任何和所有帮助。

I am well versed in VB/VBA, its the OneNote Object model that I am struggling with. Any and all help is much appreciated.

Terry M。

推荐答案

您好
tmag,

尝试测试下面的例子。

Sub PrintToOneNote()
    Dim DefaultPrinter As Variant
    DefaultPrinter = Application.ActivePrinter
   
    Application.ActivePrinter = "Send To OneNote : demo print:"
    ActiveWindow.SelectedSheets.PrintOut Copies:=1
    Application.ActivePrinter = DefaultPrinter
End Sub

参考:

Excel Geeking:使用  VBA 向OneNote发送选择

Excel Geeking: Sending A Selection To OneNote With VBA



使用Excel VBA将内容推送到OneNote
     


Using Excel VBA to Push Content to OneNote
     

       
OneNote 2010:使用OneNote.CreateOneNotePage以编程方式创建新页面

        OneNote 2010: Create New Pages Programmatically Using OneNote.CreateOneNotePage

免责声明:此回复包含参考第三方万维网站点。 Microsoft提供此信息是为了方便您。 Microsoft没有b $ b控制这些网站,也没有测试在这些网站上找到的任何软件或信息;因此,Microsoft不能就其中发现的任何软件或信息的质量,安全性或适用性做出任何陈述。使用互联网上的任何软件都存在固有的危险
,并且Microsoft提醒您在从互联网上检索任何软件之前确保您完全了解风险。

Disclaimer: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

问候

Deepak


这篇关于从Excel数据创建OneNote部分和页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆