SharePoint Blogs / SharePoint University
SharePoint Blogs and SharePoint University - all in one place!
Need SharePoint Training? Attend a SharePoint Bootcamp!

Please delete cookies related to sharepointblogs.com and sharepointu.com to resolve login issues!

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:
http://office.microsoft.com/en-us/sharepointserver/HA100240451033.aspx

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..


Posted 11-29-2007 3:00 PM by Mirjam

Comments

Steve Chrysostom wrote re: Displaying a file or a folder in the Page Viewer Web Part
on 11-29-2007 9:42 AM

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!

apearce wrote re: Displaying a file or a folder in the Page Viewer Web Part
on 11-29-2007 4:18 PM

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!

apearce wrote re: Displaying a file or a folder in the Page Viewer Web Part
on 11-29-2007 4:24 PM

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

Links (11/29/2007) « Steve Pietrek’s SharePoint Stuff wrote Links (11/29/2007) « Steve Pietrek’s SharePoint Stuff
on 11-29-2007 6:26 PM

Pingback from  Links (11/29/2007) « Steve Pietrek’s SharePoint Stuff

SharePoint 2007 Link love: 12-02-2007 part two at Virtual Generations wrote SharePoint 2007 Link love: 12-02-2007 part two at Virtual Generations
on 12-01-2007 5:36 PM

Pingback from  SharePoint 2007 Link love: 12-02-2007 part two at  Virtual Generations

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Need SharePoint Training? Attend a SharePoint Bootcamp!
Posts (c) their respective authors. Everything else (c) 2009 SharePoint Experts, Inc.