0

When you want to view a document Online, for example Word Document, the Url of the document is :

https://mytenant.sharepoint.com/:w:/r/sites/mysite/_layouts/15/Doc.aspx?sourcedoc=%7B3DDF11BE-5043-4B3F-8EFE-FD53381F537A%7D&file=Document.docx&action=default&mobileredirect=true

The GUID is the UniqueID of the document in SharePoint.

It would be very interesting to select an older version of the document to view using a syntax like underneath (for the revision 1 of a document) as when you want to download a specific revision of a document?

For Downloading the revision 1 of MyDocument.docx the syntax is :

https://mytenant.sharepoint.com/sites/mysite/_vti_history/512/Documents%20partages/MyDocument.docx

For viewing this underneath URL could be great:

https://mytenant.sharepoint.com/:w:/r/sites/mysite/_vti_history/512/_layouts/15/Doc.aspx?sourcedoc=%7B3DDF11BE-5043-4B3F-8EFE-FD53381F537A%7D&file=Document.docx&action=default&mobileredirect=true

0

You could access the previous version document like following.

http://yoursite/yoursubsite/_vti_history/512/Documents/Book1.xlsx (Accessing version 1.0)

One thing to note if you have only one version of the document then this will give 404 page not found error.

_vti_history - Virtual directory

512 - See the following table then you could understa

“1” = version “0.1“

http://yoursite/yoursubsite/_vti_history/1/Documents/Book1.xlsx

“2” = version “0.2“

http://yoursite/yoursubsite/_vti_history/2/Documents/Book1.xlsx

“512” = version “1.0“

http://yoursite/yoursubsite/_vti_history/512/Documents/Book1.xls

“1025” = version “2.1“

http://yoursite/yoursubsite/_vti_history/1025/Documents/Book1.xls

Formula : Major Version * 512 + Minor Version

Reference: How to download the historical file version content using CSOM

| improve this answer | |
  • Hello @jerry, thank you for that, I'm aware of that but I don't want to download it, I just want to view it (with VisioOnline, with Word online or with Excel Online) without downloading it. – Michel LAPLANE Oct 22 '19 at 7:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.