将SharePoint列表项导出到OneNote? [英] Export SharePoint list item to OneNote?

查看:88
本文介绍了将SharePoint列表项导出到OneNote?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我和我的同事每天都使用SharePoint来接收保密请求.每当我们开始处理此类请求时,我都希望生成一个OneNote部分来对它做出自己的评论(OneNote笔记本通常处于脱机状态 在这个阶段).但是,每次这样做时,我都必须手动将SharePoint中的信息复制粘贴到我的笔记中,这让我很烦,当然,这是一种无效的资源使用方式.几个程序具有类似的功能来执行此操作 自动(例如Skype,Outlook).我需要的是SharePoint表面上的一个按钮-在编辑项目"视图/窗口中首选-从指定列中导出数据,这些列与正在打开或选中的列表项相关, 到新的OneNote部分(模板?).这样我就可以在OneNote中获得必要的信息,并可以用笔记完成这些信息.

Me and my colleagues use SharePoint on a daily basis to receive secific requests. Whenever we start working on such a request, I prefer to generate a OneNote section to make ourself comments about it (the OneNote notebook is usually offline at this stage). Every time I do so however, I have to copy-paste the information from SharePoint to my notes manually, which I am tired of, and of course it is an ineffective way of using resources. Several programs have similar features to do this automatically (e.g. Skype, Outlook). What I would need, is a button on the SharePoint surface - preferred in the Edit Item view/window - to export data from the specified columns, that are related to the list item being open or selected, to a new OneNote section (template?). So that I would have the necessary information in OneNote, and I could complete them with my notes.

我现在想知道的是,是否有可能开发这种功能.我只想在技术上可行的情况下建议这样的项目,但是我是一个简单的用户.

What I would like to know now, is if it is possible to develop such a function or not. I would like to suggest such a project only in the case that it is technically feasible, but I am a simple user.

我知道如何将列表导出到Excel(但不导出一项),而且我还听说可以将类似上面的功能开发到MS Word,但是可以为OneNote做到吗?

I know how to export the list to Excel (but not one item), and I have also heard that it is possible to develop a function like above to MS Word, but can it be done for OneNote?

推荐答案

您可以通过CSOM获取SharePoint数据.

示例脚本:

using System;
using System.Linq;
using Microsoft.SharePoint.Client;
using SP = Microsoft.SharePoint.Client;

namespace Microsoft.SDK.SharePointServices.Samples
{
    class RetrieveListItemsInclude
    {
        static void Main()
        {
            string siteUrl = "http://MyServer/sites/MySiteCollection";

            ClientContext clientContext = new ClientContext(siteUrl);
            SP.List oList = clientContext.Web.Lists.GetByTitle("Announcements");

            CamlQuery camlQuery = new CamlQuery();
            camlQuery.ViewXml = "<View><RowLimit>100</RowLimit></View>";

            ListItemCollection collListItem = oList.GetItems(camlQuery);

            clientContext.Load(collListItem,
                 items => items.Include(
                    item => item.Id,
                    item => item.DisplayName,
                    item => item.HasUniqueRoleAssignments));

            clientContext.ExecuteQuery();

            foreach (ListItem oListItem in collListItem)
            {
                Console.WriteLine("ID: {0} \nDisplay name: {1} \nUnique role assignments: {2}",
                    oListItem.Id, oListItem.DisplayName, oListItem.HasUniqueRoleAssignments);
            }
        }
    }
}

您可以在下面的链接中查看更多详细信息.

https ://msdn.microsoft.com/zh-CN/library/office/ee534956(v = office.14).aspx

然后,由OneNote interop创建onenote,您甚至可以将应用程序(假设是控制台应用程序)安排为Windows任务计划程序,以下是供您参考的线程.

https://stackoverflow.com/questions/27294510/how-to-write-to-a-onenote-2013-page-using-c-sharp-and-the-onenote-interop  

如果您对OneNote互操作开发有疑问,可以在Office 2013开发应用中发布,我们建议适当发布的原因是您将获得最合格的受访者群体,以及其他合作伙伴 定期阅读论坛的人可以分享他们的知识.

If you have issue with OneNote interop development, you could post in Developing Apps for Office 2013, the reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge.

https://social.msdn.microsoft.com/Forums/Lync/zh-CN/home?forum=appsforoffice

最好的问候,

Lee


这篇关于将SharePoint列表项导出到OneNote?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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