View Word/Excel file in Browser?

Discussion in 'HTML' started by harry, Nov 1, 2005.

  1. harry

    harry Guest

    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
     
    harry, Nov 1, 2005
    #1
    1. Advertising

  2. harry

    harry Guest

    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?


    "harry" <> wrote in message
    news:B5L9f.141991$...
    > 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
    >
    >
    >
     
    harry, Nov 1, 2005
    #2
    1. Advertising

  3. harry

    harry Guest

    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

    "harry" <> wrote in message
    news:A6M9f.142044$...
    > 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?
    >
    >
    > "harry" <> wrote in message
    > news:B5L9f.141991$...
    > > 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
    > >
    > >
    > >

    >
    >
     
    harry, Nov 1, 2005
    #3
  4. harry

    Brian Cryer Guest

    "harry" <> wrote in message
    news:B5L9f.141991$...
    > 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.
    --
    Brian Cryer
    www.cryer.co.uk/brian
     
    Brian Cryer, Nov 1, 2005
    #4
  5. harry wrote:

    > 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
    >
    > "harry" <> wrote in message
    > news:A6M9f.142044$...
    >> 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?
    >>
    >>
    >> "harry" <> wrote in message
    >> news:B5L9f.141991$...
    >> > 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!


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

    --
    Benjamin Niemann
    Email: pink at odahoda dot de
    WWW: http://www.odahoda.de/
     
    Benjamin Niemann, Nov 1, 2005
    #5
  6. harry

    harry Guest

    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

    "Benjamin Niemann" <> wrote in message
    news:dk86db$eqr$...
    > harry wrote:
    >
    > > 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
    > >
    > > "harry" <> wrote in message
    > > news:A6M9f.142044$...
    > >> 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?
    > >>
    > >>
    > >> "harry" <> wrote in message
    > >> news:B5L9f.141991$...
    > >> > 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!

    >
    > Is your webserver correctly configured to send the appropriate

    content-type
    > (application/x-something I think) for *.doc file?
    >
    > --
    > Benjamin Niemann
    > Email: pink at odahoda dot de
    > WWW: http://www.odahoda.de/
     
    harry, Nov 1, 2005
    #6
  7. harry

    harry Guest

    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?

    "Brian Cryer" <brianc@127.0.0.1.activesol.co.uk> wrote in message
    news:...
    > "harry" <> wrote in message
    > news:B5L9f.141991$...
    > > 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.
    > --
    > Brian Cryer
    > www.cryer.co.uk/brian
    >
    >
     
    harry, Nov 1, 2005
    #7
  8. harry

    Brian Cryer Guest

    "harry" <> wrote in message
    news:1fN9f.142080$...
    > 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?
     
    Brian Cryer, Nov 1, 2005
    #8
  9. harry

    harry Guest

    yes, word & excel from office 2002 professional!


    "Brian Cryer" <brianc@127.0.0.1.activesol.co.uk> wrote in message
    news:...
    > "harry" <> wrote in message
    > news:1fN9f.142080$...
    > > 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?
    >
    >
     
    harry, Nov 1, 2005
    #9
  10. harry wrote:

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

    --
    -bts
    -Usenet is not email
     
    Beauregard T. Shagnasty, Nov 1, 2005
    #10
  11. harry

    harry Guest

    "Beauregard T. Shagnasty" <> wrote in message
    news:upcouhrlcmn5.o7yp8f5j4iq5$...
    > harry wrote:
    >
    > > 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.
    >
    > --
    > -bts
    > -Usenet is not email


    sorry!
     
    harry, Nov 1, 2005
    #11
  12. harry wrote:

    > "Beauregard T. Shagnasty" <> wrote
    >> harry wrote:
    >>
    >>> 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.
    >>
    >> --
    >> -bts
    >> -Usenet is not email

    >
    > sorry!


    Apology accepted .. but you forgot to trim the signature. :) (which I
    left in for this "demo."

    You might want to consider either a real newsreader, or adding
    OE-Quotefix to your arsenal.
    http://home.in.tum.de/~jain/software/oe-quotefix/
    http://www.tomsterdam.com/insideoe/resources/tools.htm

    --
    -bts
    -Warning: I brake for lawn deer
     
    Beauregard T. Shagnasty, Nov 1, 2005
    #12
  13. harry

    harry Guest

    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!
     
    harry, Nov 2, 2005
    #13
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stephen Witter

    opening a word doc in word not browser

    Stephen Witter, May 18, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    499
    Stephen Witter
    May 18, 2004
  2. Franck
    Replies:
    1
    Views:
    4,878
  3. =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=

    Problem with Excel reports ::::Excel 2003 Migration To Excel 2007

    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=, Oct 5, 2007, in forum: ASP .Net
    Replies:
    15
    Views:
    1,528
    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=
    Oct 24, 2007
  4. desaitapan1
    Replies:
    0
    Views:
    2,096
    desaitapan1
    Dec 29, 2010
  5. Parthiv Joshi
    Replies:
    1
    Views:
    709
    Samuel L Matzen
    Jul 6, 2004
Loading...

Share This Page