在Word Web App(WopiFrame.aspx)中显示文档的版本历史记录 [英] Showing Version History of the document in Word Web App (WopiFrame.aspx)

查看:187
本文介绍了在Word Web App(WopiFrame.aspx)中显示文档的版本历史记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello,

我在文档库"testdocument.docx"中有一个测试文档,在sharepoint中,并且我在文档库上启用了版本.

I have a test document in the document library "testdocument.docx" in sharepoint and I have versions enabled on the document library.

我的要求是在WopiFrame(在网络中)中显示文档的特定版本.我尝试在sourcedoc中传递文档的版本历史记录url,但它出错,并且当检查了核对ID时,它表示未找到文档.

My requirement is to show a particular version of the document in the WopiFrame (in web). I tried passing the version history url of the document in the sourcedoc but it errors and when checked corelation id it says document not found.

http://server/sites/1/TestSite/_layouts/15/WopiFrame.aspx?sourcedoc =/sites/1/TestSite/_vti_history/512/Documents/testdocument.docx& action = default

http://server/sites/1/TestSite/_layouts/15/WopiFrame.aspx?sourcedoc=/sites/1/TestSite/_vti_history/512/Documents/testdocument.docx&action=default

当我直接传递当前的文档网址(如下所示)时,效果很好

When I pass directly current document url like below it works fine 

http://server/sites/1/TestSite/_layouts/15/WopiFrame.aspx?sourcedoc =/sites/1/TestSite/Documents/testdocument.docx& action = default

http://server/sites/1/TestSite/_layouts/15/WopiFrame.aspx?sourcedoc=/sites/1/TestSite/Documents/testdocument.docx&action=default

它给出下面的错误

推荐答案

您需要了解版本控制的逻辑以构造正确的url.请遵循以下算法:

You need to understand the logic of the versioning to construct the correct url. Please follow the below algorithm:

当您没有任何发布版本而只有草稿版本时:

When you do not have any published version and only have draft versions:

例如

1.文档版本为0.1,则网址应为:

1. Doc version is 0.1 then the url should be like:

http://server/sites/1/TestSite/_layouts/15/WopiFrame.aspx?sourcedoc =/sites/1/TestSite/_vti_history/1/Documents/testdocument.docx&action = default

2.文档版本为0.2,则网址应为:

2. Doc version is 0.2 then the url should be like:

http://server/sites/1/TestSite/_layouts/15/WopiFrame.aspx?sourcedoc =/sites/1/TestSite/_vti_history/2/Documents/testdocument.docx&action = default

当您有1个发布版本而很少草稿版本

1.已发布的1.0版网址如下所示:

http://server/sites/1/TestSite/_layouts/15/WopiFrame.aspx?sourcedoc =/sites/1/TestSite/_vti_history/512/Documents/testdocument.docx&action = default

2.  文档版本为1.1,则网址应为:

http://server/sites/1/TestSite/_layouts/15/WopiFrame.aspx?sourcedoc =/sites/513/TestSite/_vti_history/2/Documents/testdocument.docx&action = default

3.  文档版本为1.2,则网址应为:

http://server/sites/1/TestSite/_layouts/15/WopiFrame.aspx?sourcedoc =/sites/514/TestSite/_vti_history/2/Documents/testdocument.docx& action = default

如果发布的版本超过1个,而草案的版本则很少:

1. span> The 已发布的2.0版网址如下所示:

1. The published version 2.0 url will look like:

http://server/sites/1/TestSite/_layouts/15/WopiFrame.aspx?sourcedoc =/sites/1/TestSite/_vti_history/1024/Documents/testdocument.docx& action = default

2.  文档版本为2.1,则网址应为:

http://server/sites/1/TestSite/_layouts/15/WopiFrame.aspx?sourcedoc =/sites/1025/TestSite/_vti_history/2/Documents/testdocument.docx&action = default

3.  文档版本为2.2,则网址应为:

http://server/sites/1/TestSite/_layouts/15/WopiFrame.aspx?sourcedoc =/sites/1026/TestSite/_vti_history/2/Documents/testdocument.docx&action = default

结论:

仅适用于草稿版本的公式:

1.假设0.n是草稿版本,则网址为:

http://server/sites/1/TestSite/_layouts/15/WopiFrame.aspx?sourcedoc =/sites/ [n ]/TestSite/_vti_history/2/Documents/testdocument.docx& action = default

http://server/sites/1/TestSite/_layouts/15/WopiFrame.aspx?sourcedoc=/sites/[n]/TestSite/_vti_history/2/Documents/testdocument.docx&action=default

2.您有任何发布的版本:

假设n.0是版本,则该网址为:

http://server/sites/1/TestSite/_layouts/15/WopiFrame.aspx?sourcedoc =/sites/ [512x(n)] /TestSite/_vti_history/2/Documents/testdocument.docx&action=default

http://server/sites/1/TestSite/_layouts/15/WopiFrame.aspx?sourcedoc=/sites/[512x(n)]/TestSite/_vti_history/2/Documents/testdocument.docx&action=default

3.  ; 假设 n.m是版本,其中n是已发布版本,而m是草稿版本,则网址为:

3. Assume n.m is the version where n is the published version and m is the draft version then the url will be:

http://server/sites/1/TestSite/_layouts/15/WopiFrame.aspx?sourcedoc =/sites/ [512x(n)+ m] /TestSite/_vti_history/2/Documents/testdocument.docx&action=default

http://server/sites/1/TestSite/_layouts/15/WopiFrame.aspx?sourcedoc=/sites/[512x(n)+m]/TestSite/_vti_history/2/Documents/testdocument.docx&action=default

希望这会有所帮助!




这篇关于在Word Web App(WopiFrame.aspx)中显示文档的版本历史记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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