How do I insert a Word Doc into a web page?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zphp01
    New Member
    • Apr 2007
    • 3

    How do I insert a Word Doc into a web page?

    Hello:

    I need to insert a word document into a web page so that visitors can print it or save a copy. Is there an easy way to do this? I'm new with html and javascript.

    Thanks!
    Pete
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Welcome to TSDN.

    If the settings are correct from the client-side, you could get the browser to open Word documents automatically within the browser instead of opening the application.

    You could have an iframe within the page that points to the document.
    [HTML]<iframe src="pathtoword doc.doc">[/HTML]

    Comment

    • zphp01
      New Member
      • Apr 2007
      • 3

      #3
      Thanks for the quick response. I tried the iframe instruction and now I am able to see the doc. But, 2 annoying things happened. 1) when I open the webpage it immediately prompts me to open, save or cancel the doc. I would much rather have the user click a doc icon to open it if they want to read it, and not be bothered with it if they are not interested. And 2), if I chose open, it only opens what looks like a very small default frame size. Can I increase this frame size?

      Thanks again,
      Pete

      Originally posted by acoder
      Welcome to TSDN.

      If the settings are correct from the client-side, you could get the browser to open Word documents automatically within the browser instead of opening the application.

      You could have an iframe within the page that points to the document.
      [HTML]<iframe src="pathtoword doc.doc">[/HTML]

      Comment

      • zphp01
        New Member
        • Apr 2007
        • 3

        #4
        I just found out that I can use the below html to do what I'm looking for:

        <a href="http://sitename/docname.doc" target="’new’"> Click Here for a printable copy</a>

        Thanks for everyone's consideration on this!

        Pete


        Originally posted by zphp01
        Thanks for the quick response. I tried the iframe instruction and now I am able to see the doc. But, 2 annoying things happened. 1) when I open the webpage it immediately prompts me to open, save or cancel the doc. I would much rather have the user click a doc icon to open it if they want to read it, and not be bothered with it if they are not interested. And 2), if I chose open, it only opens what looks like a very small default frame size. Can I increase this frame size?

        Thanks again,
        Pete

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          Originally posted by zphp01
          I just found out that I can use the below html to do what I'm looking for:

          <a href="http://sitename/docname.doc" target="’new’"> Click Here for a printable copy</a>

          Thanks for everyone's consideration on this!

          Pete
          Glad you got it working. Did you get the frame size to be the right size?

          Comment

          • overandback
            New Member
            • Apr 2007
            • 1

            #6
            Originally posted by acoder
            Welcome to TSDN.

            If the settings are correct from the client-side, you could get the browser to open Word documents automatically within the browser instead of opening the application.

            You could have an iframe within the page that points to the document.
            [HTML]<iframe src="pathtoword doc.doc">[/HTML]
            Hi
            I am trying to do something similar with word. I have an asp webpage (vb 2005). I want to open a template and so users can edit it however this causes problem on client machines. if I open word within the browser (<iframe src="pathtoword doc.doc">) how do I edit the document programatically eg find and replace.
            Any help appreciated.
            Thanks.
            I

            Comment

            • Rebecca999
              New Member
              • Feb 2016
              • 3

              #7
              The most easy way is some third part tools like Google Docs. If you have a web application and want to edit word in this web app, you can try aceoffix.

              Comment

              Working...