微软关于SharePoint.OpenDocuments的技术说明

从STM32转战华大HC32F4A0:我的踩坑实录与10个USART的灵活配置心得 本文分享了从STM32迁移至华大HC32F4A0的实战经验,重点解析了10个USART的灵活配置技巧及常见问题解决方案。通过对比STM32F407,详细介绍了HC32F4A0在外设灵活性、IO功能组设计及多串口应用中的优势,帮助开发者快速掌握国产芯片的开发要点。 阅读详情

SharePoint Team Services Client API

原文:
http://msdn2.microsoft.com/en-us/library/ms947899.aspx


Contents
Overview
SharePoint.OpenDocuments Class
SharePoint.SendForReview Class
SharePoint.SpreadsheetLauncher Class

Overview
The Client API Reference for SharePoint Team Services from Microsoft describes classes and methods that can be called from two dynamic link libraries (DLLs) that are installed locally (in the /Program Files/Microsoft Office/Office10 directory) during Microsoft Office setup. The OpenDocuments class is defined in owsclt.dll, while the SendForReview and SpreadsheetLauncher classes are defined in owssupp.dll. Developers can use these classes and methods to extend the functionality of the DLLs for automating various tasks on a SharePoint team Web site. Script can be used, for example, to open or create documents, send documents for review, and import or export lists to or from a team Web site.

To instantiate one of these classes, use the function new ActiveXObject("SharePoint.ClassName.1") in JavaScript, or CreateObject("SharePoint.ClassName.1") in Microsoft Visual Basic Scripting Edition (VBScript), where the progID, class, and version number are specified. The following example demonstrates how to open a document for editing in JavaScript:

<SCRIPT language="JavaScript">
function editDocumentWithProgID() {
   EditDocumentButton = new ActiveXObject("SharePoint.OpenDocuments.1");
   if (EditDocumentButton) {
      var strDocument = document.frmEditDoc.EditFile.value;
      var varProgID = document.frmEditDoc.FileProgID.value;

   EditDocumentButton.EditDocument(strDocument); } }
</SCRIPT>

The following example shows how to accomplish the same task in VBScript:

<SCRIPT language="VBScript">
Sub SubmitEditFile_OnClick
   Dim EditDocumentButton
   Dim strDocument
   Dim EditDoc

   Set EditDocumentButton = CreateObject("SharePoint.OpenDocuments.1")
   EditDoc = IsObject(EditDocumentButton)

   If EditDoc Then
      strDocument = document.frmEditDoc.EditFile.value
      EditDocumentButton.EditDocument(strDocument)
   End If

End Sub
</SCRIPT>
In both examples, a form can be used to call the function and pass it a value for the strDocument variable, specifying the document's URL.

For a code example illustrating the import of contacts from an address book into the contacts list of a SharePoint team Web site, see Code Example for Importing Contacts.

SharePoint.OpenDocuments Class
Allows a team Web site user to create documents based on a specified template or to edit documents with their associated applications.

CreateNewDocument Method
Creates a new document based on the specified template and returns a Boolean value. True indicates that the document was successfully created.

Syntax
expression.CreateNewDocument(TemplateLocation, DefaultSaveLocation)

expression An expression that returns an OpenDocuments object.
TemplateLocation Required String. The URL of the template from which the new document is created, or the programmatic identifier of the application to be invoked when creating the new document.
DefaultSaveLocation Required String. The path specifying a suggested default location for saving the new document.

Example
The following example creates a new document whose progID and default save location are specified by the values for strFileType and strSaveLoc that are passed to the createNewDocument function. The example assumes the existence of a form named frmCreateDoc that has two input boxes, CreateFileType and FileSaveLoc.

<SCRIPT language="JavaScript">
function RefreshOnFocus() {
   window.location.href = window.location; }

function createNewDocument() {
   NewDocumentButton = new ActiveXObject("SharePoint.OpenDocuments.1");

   if (NewDocumentButton) {
      var strFileType = document.frmCreateDoc.CreateFileType.value;
      var strSaveLoc = document.frmCreateDoc.FileSaveLoc.value;
   
         if (NewDocumentButton.CreateNewDocument(strFileType, strSaveLoc)) {
            window.onfocus = RefreshOnFocus; } } }
</SCRIPT>

EditDocument Method
Opens the specified document for editing with its associated application or with the specified editor and returns a Boolean value. True indicates that the document was successfully opened.

Syntax
expression.EditDocument(DocumentLocation, [ProgID])

expression An expression that returns an OpenDocuments object.
DocumentLocation Required String. The URL of the document to open for editing.
ProgID Optional String. The ProgID of the application with which the document is to be edited. If this argument is omitted, the default editor for the document is used.

Example
This example opens a specified document for editing. It assumes the existence of a form that calls the editDocumentWithProgID function and passes it the document's URL and the ProgID of the editing application.

<SCRIPT language="JavaScript">
function editDocumentWithProgID(){
   EditDocumentButton = new ActiveXObject("SharePoint.OpenDocuments.1");

   if (EditDocumentButton) {
      var strDocument = document.frmEditDoc.EditFile.value;
      var varProgID = document.frmEditDoc.FileProgID.value;

      EditDocumentButton.EditDocument(strDocument, varProgID); } }
</SCRIPT>

SharePoint.SendForReview Class
Allows a SharePoint team Web site user to initialize an e-mail review process for a particular document and enables comments and change tracking.

SendForReview Method
Launches a specially formatted e-mail message in the user's e-mail client application so that a document can be sent for review.

Syntax
expression.SendForReview(URL)

expression An expression that returns a SendForReview object.
URL Required String. The URL of the document to send for review.

Example
The following example launches an e-mail message to send a specified document for review. It assumes the existence of a form that calls the SendForReview function and passes it a value for the document's URL.

<SCRIPT language="VBScript">
Sub SendFile_OnClick
   Dim SendForReviewButton
   Dim RevButton
   Dim strUrl
  
   Set SendForReviewButton = CreateObject("SharePoint.SendForReview.1")
   RevButton = IsObject(SendForReviewButton)

   If RevButton Then
      strUrl = document.frmSendDoc.FileUrl.value
      SendForReviewButton.SendForReview(strUrl)
   End If
End Sub
</SCRIPT>

SharePoint.SpreadsheetLauncher Class
Allows a SharePoint team Web site user to import lists from spreadsheets or to verify if a compatible spreadsheet application is available for list export.


EnsureImport Method
Verifies that the control used for import and export of contacts is present and registered.

Syntax
expression.EnsureImport()

expression An expression that returns a SpreadsheetLauncher object.

Example
The following example creates a SpreadsheetLauncher object and verifies its presence and registration. For a full example that implements this code block, see Code Example for Importing Contacts.

Set objEnsureImport = CreateObject("SharePoint.SpreadsheetLauncher.1")

If IsObject(objEnsureImport) Then
   objEnsureImport.EnsureImport()
End If
GetCLSID Method
Returns a String representing the class identifier (CLSID) for the specified object. Use this value to construct an <OBJECT> tag to which Microsoft Internet Explorer can bind calls.

Syntax
expression.GetCLSID()

expression An expression that returns a SpreadsheetLauncher object.

Example
See the example given for the following method.

ImportList Method
Imports a list to the SharePoint team Web site and returns a String representing the URL for the new list, to which the user is automatically navigated upon completion of the import.

Syntax
expression.ImportList(List, Title, QuickLaunch, URL)

expression An expression that returns a SpreadsheetLauncher object.
List Required String. The name of the list to be created.
Title Required String. The displayed description of the list to be created. An empty string means a description is not displayed on the new list page.
QuickLaunch Required String. True if a link to the default view page of the new list is added to the Quick Launch bar.
URL Required String. The absolute URL for owssvr.dll (in the virtual server's Program Files/Common Files/Microsoft Shared/web server extensions/50/isapi directory) to which the constructed import request is posted.

Example
This example uses the ImportList method to import data from a spreadsheet into a SharePoint team Web site. After creating a SpreadsheetLauncher object, the example uses the GetCLSID method to construct an <OBJECT> tag for writing the object to the page.

<SCRIPT language="JavaScript">
SpreadsheetLauncherButton = new ActiveXObject("SharePoint.SpreadsheetLauncher.1");

if (SpreadsheetLauncherButton) {
   var launcherCLSID = SpreadsheetLauncherButton.GetCLSID();
   var objectTag = '<OBJECT classid="clsid:' + launcherCLSID + '" id="SpreadsheetLauncherObj" style="display:none;"></OBJECT>';

   document.write(objectTag); }

function DoImportSpreadsheet() {
   var form = document.frmNewList;
   var resultUrl;

   resultUrl = SpreadsheetLauncherObj.ImportList(form['List'].value," ", false, 'http://STSServer1/_vti_bin/owssvr.dll?CS=109&');
   window.parent.location.assign(resultUrl);
   return false; }
</SCRIPT>
The preceding example assumes the existence of a form like the following, which calls the DoImportSpreadsheet function and passes several INPUT values to the server.

<FORM name="frmNewList" onsubmit="return DoImportSpreadsheet();">
  <INPUT type="Text" title="Name" name="List" maxLength="255">
  <INPUT type="File" name="SpreadsheetFile" style="behavior: url(#SpreadsheetLauncherObj);">
  <INPUT type="Hidden" name="ListTemplate" value='SpreadsheetImport'>
  <INPUT type="Submit" value="Import">
  <INPUT type="Hidden" name="Project" value="ows">
  <INPUT type="Hidden" name="Cmd" value="NewList">
</FORM>
IqyImportEnabled Method
Returns a Boolean value, True indicating that the specified control supports import or export of Web query (.iqy) files. An .iqy file serves as a wrapper for a Web query, and it contains metadata for returning the actual list data. This method determines a registered handler for .iqy files, so that the browser launches the appropriate application when the file is downloaded.

Syntax
expression.IqyImportEnabled()

expression An expression that returns a SpreadsheetLauncher object.

Example
The following example exports the Contacts list of a team Web site to a spreadsheet, using the IqyImportEnabled method to verify that the export is possible.

<SCRIPT language="JavaScript">
function ExportList(using){
   ExporterObj = new ActiveXObject("SharePoint.SpreadsheetLauncher.1");

   if (ExporterObj && ExporterObj.IqyImportEnabled()) {
      window.parent.location.href = using + "&Source=" + window.location.href; } }
</SCRIPT>
The onclick attribute of an <A> tag that would call the ExportList function contains a URL such as the following, which uses the query.iqy file for processing the query:

javaScript:ExportList('http://STSServer1/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List=Contacts&View=&CacheControl=1');javascript:return false;
 

RT-DETR改进策略【Conv和Transformer】| ICCV-2023 iRMB 倒置残差移动块 轻量化的注意力模块 本文记录的是利用模块优化的目标检测网络模型。的作用在于克服了常见模块无法同时吸收CNN 效率建模局部特征和利用Transformer 动态建模能力学习长距离交互的问题。相比一些复杂结构或多个混合模块的方法,能更好地权衡模型成本和精度。本文将其用于的模型改进和二次创新,更好地突出重要特征,提升模型性能。Rethinking Mobile Block for Efficient Attention-based Models从微观角度看,由和组成。及其改进的实现代码如下: 四、创新模块 4.1 改进点1⭐ 模块 阅读详情

相关推荐

SAP PP CSAP_MAT_BOM_MAINTAIN ECN 增加组件

SAP PP CSAP_MAT_BOM_MAINTAIN ECN 增加组件。

GAVIN 415

终于获取了SharePoint.OpenDocument对象打开的Word对象

    网上很多地方介绍了如何用SharePoint.OpenDocument打开基于WebDAV协议的Word文档,可是打开后,如果对文档进行一些设置操作,却苦于没有Word对象。     我这里实现了得到Word.Application对象,可以进行设置文档域一类的操作了。     可是,我本来想得到文档的保存事件并激活我的处理函数,目前这里卡住了,貌似没有出路。谁有?   Code ...

weixin_34223655的博客 588

风力摆控制系统 PCB 设计 3 要点:STM32+MPU6050+空心杯电机驱动一体化

本文详细解析了风力摆控制系统PCB设计的3大核心要点,重点介绍STM32主控、MPU6050姿态传感器与空心杯电机驱动的一体化方案。通过系统架构设计、PCB布局布线技巧以及噪声抑制方案,帮助参赛者在电子设计竞赛中构建高精度、高稳定性的风力摆控制系统,提升竞赛作品性能。

weixin_30363285的博客 370

用SharePoint.OpenDocuments打开的文档如何控制它的ActiveWindow.View.ShowXMLMarkup(转)

我用客户端脚本很正常,可以控制XML标记的显示或隐藏:、 脚本一: <SCRIPT language= "jscript " > var myDocApp=new ActiveXObject( "Word.Application "); myDocApp.visible = true; myDocApp.activate(); var m...

weixin_30706507的博客 305

CLion与STM32CubeMX联调:JLink GDB Server高效调试指南

本文详细介绍了如何搭建并配置CLion、STM32CubeMX与JLink GDB Server联调的现代化STM32开发环境。通过一站式环境搭建、工程创建、核心调试配置及高级技巧(如RTT日志),该组合实现了高效的代码编辑、可视化配置与稳定调试,大幅提升嵌入式开发效率与体验。

web99的专栏 258

用Multisim仿真AD630锁定放大器:从2012年电赛A题实战到避坑指南

本文详细介绍了如何使用Multisim仿真AD630锁定放大器,从2012年电赛A题实战出发,提供完整的电路搭建、参数优化及避坑指南。重点解析AD630的开关调制架构和双相位检测的工程实现,帮助读者在强噪声背景下有效提取微弱信号,提升电子设计竞赛和工程实践中的信号处理能力。

weixin_42549451的博客 206

如何在Web页面上直接打开、编辑、创建Office文档

注意:为了让Word能将编辑后的文档直接保存会服务器,访问Web站点的当前上下文的Windows Identity必须对服务器的相应目录(即“http://www.abc.com/documents”这个虚拟目录所对应的服务器上的物理路径)有相应的写权限,否则保存动作会失败。就可以使用“http://www.abc.com/documents/sampleTemplate.dot”这个模版来创建一个新的文档,默认新文档的保存地点是“http://www.abc.com/documents/”。

qq_61141142的博客 812

【文献阅读:信道估计】Deep Residual Learning Meets OFDM Channel Estimation

基于深度学习的信道估计技术

weixin_43178683的博客 1770

IE8 不能够在Sharepoint平台上在线打开Office文档解决方案

当点击Document Library里面的文档,使用Edit in Microsoft Excel/Word的时候,出现如下错误: The document could not be opened for editing. A Microsoft SharePoint Foundation compatible application could not be found to edit th...

weixin_30588827的博客 386

用74LS194和555定时器DIY流水灯:一个经典的数字电路课程设计复盘(附Multisim仿真文件)

本文详细介绍了使用74LS194移位寄存器和555定时器搭建八路彩灯控制器的完整过程,包括硬件选型、电路设计、调试技巧及常见问题解决方案。作为经典的数字电路课程设计,该项目涵盖了EDA工具应用、电路原理图设计和Multisim仿真等核心技能,适合电子工程学习者实践参考。

weixin_29185199的博客 435

【完整梳理验证】企业微信第三方应用接入全流程java版

由企业内部的开发者自己开发部署,相当于是企业自己的资产,调用接口基本没有任何限制。由SaaS服务商的开发者开发并部署在服务商侧,面向所有企业。需要企业授权使用(先试用后付费),服务商仅可获取企业授权部分的权限,相当于白名单控制。由服务商的开发者开发,但部署在企业内部。一般是线下签约采购方式,因此权限几乎与自建应用无异,企业管理员只需要配置不对服务商开放的敏感权限,相当于黑名单控制。服务商后台地址:企业微信服务商官网企业管理后台地址:企业微信管理后台服务商,可以理解为 SAAS 中的运营端。企业管理端,可以理

Hello, New World! 2777

ActiveXObject打开word

my youth      function doword()   {    var WordApp=null;    try{  WordApp = new ActiveXObject("Word.Application");   }catch(e){  alert("IE的安全级别过高!请在IE的菜单栏中:工具——INTERNET选项——安全---本地I

爱兰河少 1万+

Autosar NvM配置-手动配置Nvblock及使用-基于ETAS软件

NVM作为存储协议栈中最顶层的模块,是必须要掌握的。目前项目基本使用MCU带的Dflash模块,使用Fee模拟eeprom。在项目前期阶段,应该充分讨论需要存储的内容,包括应用数据,诊断数据等,用以评估Dflash空间是否够用。本文基于ETAS软件介绍NVBlock配置生成NVM参数及使用。使用NVBlock配置生成,基本不用手写代码,还是比较方便的。对于Nv block的划分,建议将同时写的一类数据放到一个block中,因为block除了data以外,Fee还会增加一些header数据,占用不少内存。

赞的博客 1896

在线编辑Office文件

前言 第一次用SharePoint的时候感觉很惊奇,竟然可以在本地编辑服务器上的Office文件!不过不知道为什么一直没有想要知道为什么可以这样做。 前两天园子里有一篇文章引发了激烈的讨论。其中有人问楼主一些问题,其中就有这个。OK,那就看看到底的为什么吧。 准备 此部分可忽略,可直接看正文部分。 找原因的过程蛮简单。随便打开了公司SharePoint上的Document页,看HTML源...

weixin_34167043的博客 192

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

贝叶斯统计 [韦来生编]

贝叶斯(Bayes)统计是近几十年来迅速发展起来的数理统计的一个重要分支。贝叶斯方法与经典统计方法的主要不同之处是进行统计推断时除了利用样本信息外,还要利用参数的先验信息,因此可以提高统计推断或统计决策的效果。它在经济、金融、生物、医学、自然科学和社会科学等许多领域具有广泛的应用。贝叶斯方法的研究已渗透到了统计学的几乎所有领域。作者在给中国科学技术大学概率论与数理统计专业本科生开设的“数理统计”课程中有一章专门讲授“贝叶斯方法和统计决策理论”,近十年来也给中国科学技术大学概率统计专业研究生开设过几次“贝叶斯分析”课。本书是在对过去讲稿的内容作了适当的增减和调整的基础上完成的。  本书共分六章。第1章是绪论,介绍了贝叶斯统计的若干基本概念,同时对必要的数理统计的基础知识有重点地作了回顾。第二章介绍了确定先验分布的若干可供选择的方法。第三章介绍了几类常见统计模型参数的后验分布的主要结果和计算方法。第四章和第五章分别介绍了“贝叶斯统计推断”和“贝叶斯统计决策”的内容。第六章介绍了贝叶斯统计计算的若干方法,包括蒙特卡洛方法和马尔可夫链蒙特卡洛(MCMC)方法以及相关统计软件的简介。本书的每一章附右大量的例题和习题,书末附有常用的几个表格和部分习题解答供读者查用。  大约可在54学时内讲授本书的第1章至第六章的主要内容,教师可根据学时需要选讲本书第1章至第六章的部分内容。书中标“*”号的章节可略去不讲,留给读者作为阅读材料。第六章例题中的R代码和部分例题的数据文件等可从作者个人主页下载。  作者在编写本书的过程中参考了J.O.Berger教授的《统计决策论及贝叶斯分析》和茆诗松教授编写的《贝叶斯统计》等书中的一些内容,以及《贝叶斯分析》一书中由张伟平博士编写的有关贝叶斯统计计算的一些内容。在此表示衷心感谢。  本书编写准备过程中,中国科学技术大学统计与金融系的几个研究生帮助完成了本书部分中文的录入和排版,作者对他们的辛勤工作表示真诚的感谢。高等教育出版社为本书的出版给予了大力支持。在此一并致谢。

SharePoint 2010 在WebPart页面上调用扩展方法报方法未定义的解决方案

SharePoint 2010 在WebPart页面上调用扩展方法报方法未定义的解决方案 SharePoint 2010是基于.NET 3.5的,但是微软一直是神坑,页面前台居然不支持扩展方法,也就是你可以在后台代码里面使用扩展方法,但是不能在前台页面 上逍遥,否则会打回原型,比如在WebPart页面上加入如下代码: &lt;%@ Import ...

magicodes 154

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

谷歌AI高层变动:Hassabis升任Alphabet首席科学家,Jeff Dean离职创业

人工智能(AI)作为引领新一轮科技革命的核心驱动力,其发展不仅依赖于算法模型的突破,更与行业巨头的战略布局和资源分配紧密相关。从技术原理上看,AI的演进遵循着从基础研究到工程化、再到生态构建的路径,其中领导层的决策直接影响着技术路线的聚焦与资源投入方向。在工程实践层面,高效的AI基础设施和系统优化能力成为决定技术落地成本与规模的关键因素。此次谷歌DeepMind领导层调整,将AGI(通用人工智能)研究提升至集团战略高度,同时顶尖工程师转向下一代AI基础设施创业,预示着行业竞争正从模型能力比拼进入深水区的生态

weixin_30606461的博客 305

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

修改web office apps 默认在浏览器中打开

最近在搞鼓web office apps的时候发现,在新建文档的时候,   IE浏览器会默认检测本机是否安装了office系列,安装了的话会尝试用客户端office打开模板文档新建。 下图是客户端安装了office 2007 sp2版本的情况(测试了三个版本的office,office 2003、office 2007、office 2007 sp2,发现office 2007 sp

水工鸟的专栏 1963

深入剖析 SharePoint集成 Office 应用程序

深入剖析 SharePoint集成 Office 应用程序 Pav Cherny 目录 Office 应用程序集成 扩展 SharePoint UI 使用 Office OpenDocuments 控件 与 SharePoint 进行通信 实现自定义 OpenControl 解决方案 总结 Microsoft Windows SharePoint S

Jeffrey Lin的专栏 3398

SharePoint 通过客户端API访问SharePoint状态栏

SharePoint 通过客户端API访问SharePoint状态栏 本文我们将探索微软发布的SharePoint 2010 版本提供的两个新功能。一个是状态栏,另一个是通知区域。这两个都在不打扰用户前提下提供通知功能。 SharePoint 2010版本中,微软在SharePoint站点设计和呈现层面上做出了重大改变。在SharePoint 2010中...

weixin_30698527的博客 325
上一篇: Apache配置在一个IP地址上运行多个基于域名的web站点
下一篇: 微软关于SharePoint.OpenDocuments的技术说明
bjhdy
博客等级 码龄19年 2粉丝 4原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值