【问题标题】:Programmatically convert OneNote sections to XPS以编程方式将 OneNote 部分转换为 XPS
【发布时间】:2019-11-16 09:32:17
【问题描述】:

我需要一种以编程方式将 OneNote 分区文件 (.one) 转换为 XPS 格式的方法。我知道 Excel 和 Word 是如何工作的,但 Interop.OneNote 不同。

【问题讨论】:

    标签: xps onenote


    【解决方案1】:

    您将使用Publish 函数 (http://msdn.microsoft.com/en-us/library/gg649853.aspx),例如:

    using Microsoft.Office.Interop.Onenote;
    
    ...
    
    Application onApp = new Application();
    string sectionid = "your section id here..."; //could also be a page or notebook id
    string path = "your filepath here..."; //e.g. C:\Users\MyUsername\Documents\hi.xps
    onApp.Publish(sectionid, path, PublishFormat.pfXPS);
    

    【讨论】:

      猜你喜欢
      • 2010-10-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-07-03
      • 2011-09-20
      • 2013-02-09
      相关资源
      最近更新 更多