1

I want to display a .docx (Word) document in a Sharepoint page. I have a sharepoint page with a Page Viewer web part an a Word document on the same Sharepoint site. What I'm trying to do is the following :

  • Copy the link to the word document
  • Open the tool pane for the web part
  • Copy the link to the word document in the link text box
  • Click ok

The document is not displayed, and when I re-open the tool pane, the link has disappeared. See screenshots below : Empty page viewer after adding link

Link text box goes back to default

I assume I'm doing something wrong, but I get 0 feedback from Sharepoint. No error, the link (when I test it) works, etc...

3
  • which sharepoint you are using...online? Commented Nov 26, 2018 at 9:13
  • @GaneshSanap Yes, Sharepoint Online.
    – jdebache
    Commented Nov 26, 2018 at 9:28
  • Check notes from my answer and make sure you have done both of them. Commented Nov 26, 2018 at 9:30

1 Answer 1

1

Follow below steps to achieve this:

  1. Go to your SharePoint page.
  2. Add web part from : Media and Content > Page Viewer Web Part > Insert
  3. Edit web part properties.
  4. Keep web part settings as "Web Page"(first option in web part properties).
  5. Copy the link of a document file in a document library from the ellipsis(...) with ?Web=1.
  6. Paste URL in the Link field of web part.
  7. Click Apply.
  8. Resize web part height from "Appearance" if needed.
  9. Save page.

Note:

  1. The URL to the Word/PDF file will end with the parameter ?Web=1 after the file name as this is what makes a office document open in Office Web Apps. So keep it as it is.

  2. If the office Web Apps installed and connected to your SharePoint farm then it will render the document file on the web page inside Word Web App.

Update:

  1. For Modern Pages on SharePoint online, you can use the file viewer web part on pages.
  2. Use the File viewer web part to insert a file on your page. File types you can insert include Excel, Word, PowerPoint, Visio, PDFs, 3D models, and more.

    Source:

    1. Use the File viewer web part.
8
  • This is exactly what I did, minus the ?Web=1 thing. I tried that just now and it makes no difference. Also, clicking apply instead of ok doesn't change anything.
    – jdebache
    Commented Nov 26, 2018 at 9:40
  • do you have office web apps installed and connected on sharepoint/ Commented Nov 26, 2018 at 9:43
  • After adding URL of document in Link field, Test the Link using option given in web part properties. it is working or not? Commented Nov 26, 2018 at 9:44
  • The weird thing is, one of my colleagues managed to get a document displayed. So I'm assuming that yes, the office web apps are installed. Also I can open the document in Word online without an issue by just clicking on it, or by clicking the test link thing in the control pane for the Web Part.
    – jdebache
    Commented Nov 26, 2018 at 9:45
  • Strange. are you getting any error in browser console? or try deleting and re-adding the web part. Commented Nov 26, 2018 at 9:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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