SharePoint 2010]开发与SharePoint2010 数据同步的Outlook2007 add-in
2010-09-19 16:23
555 查看
随着VS2010和SharePoint2010的推出,微软对与office产品线的协同工作开发的支持越来越强大了,开发一些office产品 的插件也变得方便了很多,这里介绍一下啊Outlook2007 add-in的开发,使得能够和SharePoint2010完成同步。 企业在使用SharePoint的同时,有时候可以和Outlook集成起来,比如在SharePoint中创建了一个Training meeting,但是在SharePoint中无法象Outlook那样Book meeting room,添加Attendee也不如Outlook里来的方便,因此希望同时能够在Outlook中也创建meeting request,这样不仅可以完成以上功能,同样也可以使用Outlook的TO-DO list的功能,管理个人的Calendar,同时和meeting有关的信息又可以在SharePoint site上管理维护。要完成这样的功能,我们首先需要开发一个Outlook add-in。下面介绍详细步骤:
1.打开visual studio 2010 (2008亦可)->New Project, 在office栏中选择Outlook 2007 Add-in 模板,创建完项目后,Add New Item, 选择Ribbon(Visual Designer)此item.
2.双击刚才创建的Ribbon item,可以看见一个Ribbon的设计视图,根据需要修改Tab,Group的名字,并在旁边的toolbox中拖一个button到group中。 修改button的name,根据自己需要设置一些UI,这样UI部分就完成了,如下图:
代码 function OpenOutlookMeetingRequest(strTo, strCC, strSubject, strHTMLBody, strStart, strEnd, strLocation)
{
var outlookApp = new ActiveXObject("Outlook.Application");
try
{
var mailItem= outlookApp.createItem(1); //Appointment
mailItem.MeetingStatus = 1;//Set Appointment to Meeting
mailItem.Subject=strSubject;
mailItem.Body = strHTMLBody;
mailItem.Start = strStart;
mailItem.End = strEnd;
mailItem.Location = strLocation;
if(strTo != "")
mailItem.recipients.add(strTo);
mailItem.display (0);
}
finally
{
outlookApp =null;
}
}
这样,当我们在SharePoint的Training Meeting List中创建一个Meeting item结束的时候,都会弹出一个Outlook meeting request的窗口,我们把当前在Item中添加的一些相关信息,如Topic,Agenda等等先自动填入meeting request窗口的Subject和Body中,一旦我们在meeting request的窗口中完成了Room booking和Agendee的添加后,我们可以点击Ribbon tab中的同步按钮,完成信息写回到SharePoint的过程。
Tag标签: SharePoint,Outlook add-in
1.打开visual studio 2010 (2008亦可)->New Project, 在office栏中选择Outlook 2007 Add-in 模板,创建完项目后,Add New Item, 选择Ribbon(Visual Designer)此item.
2.双击刚才创建的Ribbon item,可以看见一个Ribbon的设计视图,根据需要修改Tab,Group的名字,并在旁边的toolbox中拖一个button到group中。 修改button的name,根据自己需要设置一些UI,这样UI部分就完成了,如下图:
代码 function OpenOutlookMeetingRequest(strTo, strCC, strSubject, strHTMLBody, strStart, strEnd, strLocation)
{
var outlookApp = new ActiveXObject("Outlook.Application");
try
{
var mailItem= outlookApp.createItem(1); //Appointment
mailItem.MeetingStatus = 1;//Set Appointment to Meeting
mailItem.Subject=strSubject;
mailItem.Body = strHTMLBody;
mailItem.Start = strStart;
mailItem.End = strEnd;
mailItem.Location = strLocation;
if(strTo != "")
mailItem.recipients.add(strTo);
mailItem.display (0);
}
finally
{
outlookApp =null;
}
}
这样,当我们在SharePoint的Training Meeting List中创建一个Meeting item结束的时候,都会弹出一个Outlook meeting request的窗口,我们把当前在Item中添加的一些相关信息,如Topic,Agenda等等先自动填入meeting request窗口的Subject和Body中,一旦我们在meeting request的窗口中完成了Room booking和Agendee的添加后,我们可以点击Ribbon tab中的同步按钮,完成信息写回到SharePoint的过程。
Tag标签: SharePoint,Outlook add-in
相关文章推荐
- [SharePoint 2010]开发与SharePoint2010 数据同步的Outlook2007 add-in
- MOSS 2010:Visual Studio 2010开发体验(18)——在独立的Silverlight应用程序中通过WCF访问SharePoint数据
- MOSS 2010:Visual Studio 2010开发体验(20)——使用ADO.NET Data Service快速访问SharePoint列表数据
- MOSS 2010:Visual Studio 2010开发体验(20)——使用ADO.NET Data Service快速访问SharePoint列表数据
- sharepoint 2010 列表的数据表视图无法使用 the list cannot be displayed in datasheet view 解决方法
- MOSS 2010:Visual Studio 2010开发体验(20)——使用ADO.NET Data Service快速访问SharePoint列表数据
- SharePoint 2010之数据同步External Content Type - by SharePoint Designer2010
- VS 2010 : 如何开发和部署Outlook 2010插件(Add-in)
- MOSS 2010:Visual Studio 2010开发体验(18)——在独立的Silverlight应用程序中通过WCF访问SharePoint数据
- MOSS 2010:Visual Studio 2010开发体验(18)——在独立的Silverlight应用程序中通过WCF访问SharePoint数据
- sharepoint 2010 User Profile Service 与AD用户数据同步
- (转)VS 2010 : 如何开发和部署Outlook 2010插件(Add-in)
- Sharepoint2010应用开发五:使用WCF操作Sharepoint列表数据
- VS 2010 : 如何开发和部署Outlook 2010插件(Add-in)
- 如何开发和部署Outlook 2010插件(Add-in)
- Sharepoint2010应用开发四:使用客户对象模型(Client Object Model)向SharePoint列表写数据
- [转】:VS 2010 : 如何开发和部署Outlook 2010插件(Add-in)
- VS 2010 : 如何开发和部署Outlook 2010插件(Add-in)
- VS 2010 Add-in 开发
- 将自定义数据同步到outlook2007 sharepoint列表