Displaying a file or a folder in the Page Viewer Web Part

Today I tried to do something very easy. Or at least I thought it would be. I tried to display a file in with the Page Viewer Web Part.

The first steps are actually really easy:

  • Go to the correct site
  • Select "Edit Page" under the "Site Actions"
  • Click "Add a Web Part" in the section you want the web part to be displayed in
  • Click "Modify Shared Web Part"
  • If you want to display a web page it's very straight forward. Just select "Web Page" and type in a url under link and the url will be displayed.

Unfortunately I didn't want to display a web page, I wanted to display a file. And I was struggling with the way I was supposed to format the path to a file or folder in order to get it to display. Searching on Live or Google didn't get me anything, but eventually I found it:

  • If you want to display a folder or a file you should enter a network path for a folder it would look like file://\\pc158\temp, for a file it would be file://\\pc158\temp\test.txt
  • Displaying a file or a folder will only work in Internet Explorer
  • The file opens either in a separate browser window or inside the Web Part if the application that opens the file supports inline activation for that file in the browser window. 

Some information about the Page Viewer Web Part can be found here:

I haven't seen the browse button that should appear if you select "File" on either of the three environments I tried this on. I'm wondering whether it actually exists, or whether it was supposed to be there and then left out at the last moment..

Comments -
  1. Gravatar

    FINALLY! I've been looking for this information everywhere (need to link from Sharepoint sites to files still on file shares) and this is it. Why is this information so hard to find? Isn't this a pretty broad need? Dank u zeer Mirjam!

  2. Gravatar

    What I did was enable IIS on the file server and then created a website with a virtual folder.

    If you enable Directory browsing in the properties of the virtual folder and then browse to the site you see the file store as a list of documents. If you then take the URL of the folder and enter it as a web folder under My Network you can explorer to it.

    I might do a blog post if you want!

  3. Gravatar

    I've done it through

    Enable IIS on your file store and create a new virtual directory with the alias as the top folder you want to show.

    Right click on the virtual directory and then enable directory browsing.

    When you browse to it now in IE you will see a list of teh documents and you can open and edit them from there.

    If you take the URL and add it as a web folder in My Network Place you will be able to explorer to it.

    If i get time - i do a post on my blog

  4. Gravatar
  5. Gravatar
  6. Gravatar

    when displaying folder in Page Viewer Web Part the task panal appears on the left i tried to hide it put i can`t
    kindly help me to solve this issue

  7. Gravatar

    maged - did you get a solution to your questions? i am facing a similar issue and am not able to resolve this :(

  8. Gravatar

    priyank and maged, I also need this information. :(

  9. Gravatar

    I know this is old but if anyone can help I would be very grateful. I have some web part pages used to display files in document libraries. The problem is anyone can highlight and delete the files using the keyboard! Even visitors with only read access. Does anyone know how to prevent this?

  10. Gravatar

    ... It's on an Intranet so everyone is authenticated on the network but most people only have read access to the site and doc library. Thanks

  11. Gravatar

    Displaying a file or a folder in the Page Viewer Web Part

Comments have been closed on this topic.