View Word/Excel file in Browser?

H

harry

Using IE 5.5 (sp3) on win 2000 (sp4) with Office 2002 professional - no
other browser is required i.e. Intranet app!

I have the following HTML -

<a target="_blank" href="http://localhost:8001/MyWeb/y.doc" >
<img border="0" alt="Show page help" src="images/buttons/help.gif"
style="cursor:hand">
</a>

I want the Word document to open in a new window with the Word Viewer
showing the document formatted correctly however all it does is display the
DOC file as is i.e. gibberish.

I know this can work as I've seen it on other systems whereby the DOC or XLS
file is displayed inline in the Browser window!

I'm guessing this has something to do with the MIME type note being set? but
have no idea how to set it? is it in IE settings or what?

Can anyone help? this has completely baffled me!

thanks

harry
 
H

harry

found out part of the problem, by saving the DOC file in a previous Word
format it works but Excel files still refuse to display in the excel inline
viewer - just shows the binary contents of the file!

any ideas?
 
H

harry

what's even spookier is I can open the file in IE using something like

"F:\PROJECTS\Web\MyWeb\WebRoot\z.xls"

instead of HTTP

http://localhost:8001/MyWeb/z.xls

& it opens & displays it perfectly -so just won't recognize it as a URL?

please can anyone think of anything I can try?

thanks

harry
 
B

Brian Cryer

harry said:
Using IE 5.5 (sp3) on win 2000 (sp4) with Office 2002 professional - no
other browser is required i.e. Intranet app!

I have the following HTML -

<a target="_blank" href="http://localhost:8001/MyWeb/y.doc" >
<img border="0" alt="Show page help" src="images/buttons/help.gif"
style="cursor:hand">
</a>

I want the Word document to open in a new window with the Word Viewer
showing the document formatted correctly however all it does is display
the
DOC file as is i.e. gibberish.

I know this can work as I've seen it on other systems whereby the DOC or
XLS
file is displayed inline in the Browser window!

I'm guessing this has something to do with the MIME type note being set?
but
have no idea how to set it? is it in IE settings or what?

Can anyone help? this has completely baffled me!

thanks

harry

Does it work if you replace:

href="http://...

with

href="file://...

thats what we have on our local intranet. You could also try:

href="//...

but I'm not so sure about that one.

Hope this helps.
 
B

Benjamin Niemann

harry said:
what's even spookier is I can open the file in IE using something like

"F:\PROJECTS\Web\MyWeb\WebRoot\z.xls"

instead of HTTP

http://localhost:8001/MyWeb/z.xls

& it opens & displays it perfectly -so just won't recognize it as a URL?

please can anyone think of anything I can try?

thanks

harry

Is your webserver correctly configured to send the appropriate content-type
(application/x-something I think) for *.doc file?
 
H

harry

using weblogic 8.1 (sp3) - don't suppose you know where I might configure
this coz I've never seen in in the console options?

thanks
harry
 
H

harry

Thanks for replying, from a post I just made above -

found out part of the problem, by saving the DOC file in a previous Word
format it works but Excel files still refuse to display in the excel inline
viewer - just shows the binary contents of the file!

tried both your suggestions but no different, are you able to view Excel as
well as Word files in your Browser?
 
B

Brian Cryer

harry said:
Thanks for replying, from a post I just made above -

found out part of the problem, by saving the DOC file in a previous Word
format it works but Excel files still refuse to display in the excel
inline
viewer - just shows the binary contents of the file!

tried both your suggestions but no different, are you able to view Excel
as
well as Word files in your Browser?

I can view both Word and Excel in my browser. I only have examples on my
local intranet, not on my website - so other than what I've given you (which
you said didn't work) I don't have any other examples to show.

I assume you do have both Word and Excel on the pc that you are browsing
with?
 
B

Beauregard T. Shagnasty

harry said:
Thanks for replying,

Harry, please investigate the use of the PageDown key, and reply after
the quoted material. I'm sure you have noticed everyone else is doing
this. Trim the quoted material as well, including signatures. Thanks
for your consideration.
 
H

harry

Beauregard T. Shagnasty said:
Harry, please investigate the use of the PageDown key, and reply after
the quoted material. I'm sure you have noticed everyone else is doing
this. Trim the quoted material as well, including signatures. Thanks
for your consideration.

sorry!
 
H

harry

Sussed it - added these lines to web.xml & it works!

<mime-mapping>
<extension>xls</extension>
<mime-type>application/vnd.ms-excel</mime-type>
</mime-mapping>

<mime-mapping>
<extension>doc</extension>
<mime-type>application/vnd.ms-word</mime-type>
</mime-mapping>

Thanks for everyone's help, hope this helps someone else!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top