Link directly to MS Word document

Discussion in 'HTML' started by W. de Jonge, Aug 13, 2005.

  1. W. de Jonge

    W. de Jonge Guest

    Who can help me? I want to create a link(href) which opens an .doc or an
    ..xls directly in MS Word or MS Excell and not in IE so that I don't have to
    save the document first en open it from Explorer.

    I asked our webmaster at the office but he didn't know the answer so I hope
    you can help me.

    Greetz

    Willem
    W. de Jonge, Aug 13, 2005
    #1
    1. Advertising

  2. W. de Jonge

    David Ross Guest

    "W. de Jonge" wrote:
    >
    > Who can help me? I want to create a link(href) which opens an .doc or an
    > .xls directly in MS Word or MS Excell and not in IE so that I don't have to
    > save the document first en open it from Explorer.
    >
    > I asked our webmaster at the office but he didn't know the answer so I hope
    > you can help me.


    Upload the Word or Excel file to the Web server in binary mode.
    Create a standard link of the form <a href="xxx">yyy</a>. The xxx
    should have the .doc or .xls extension found on the Word or Excel
    file.

    Your Webmaster might have to put an entry in the Web server's
    ..htaccess file for doc and xls. For that, he should consult the
    documentation for the server software. However, I would expect
    that the standard .htaccess file that came with the server already
    has such entries if they are needed.

    --

    David E. Ross
    <URL:http://www.rossde.com/>

    I use Mozilla as my Web browser because I want a browser that
    complies with Web standards. See <URL:http://www.mozilla.org/>.
    David Ross, Aug 13, 2005
    #2
    1. Advertising

  3. W. de Jonge

    Andy Dingley Guest

    ASCII upload? Was: Link directly to MS Word document

    On Sat, 13 Aug 2005 08:14:07 -0700, David Ross <>
    wrote:

    >Upload the Word or Excel file to the Web server in binary mode.


    Hmm... Don't we upload _everything_ in binary mode these days ?

    What happens to "ftp ASCII upload" in this world of XML, UTF-16 etc. ?
    Should we be worrying about this ?

    And doesn't everyone just have broadband these days and more bandwidth
    than the whole of IBM did until a few years ago,


    --
    Cats have nine lives, which is why they rarely post to Usenet.
    Andy Dingley, Aug 13, 2005
    #3
  4. W. de Jonge

    Neredbojias Guest

    With neither quill nor qualm, W. de Jonge quothed:

    > Who can help me? I want to create a link(href) which opens an .doc or an
    > .xls directly in MS Word or MS Excell and not in IE so that I don't have to
    > save the document first en open it from Explorer.


    I don't know, but is your nickname "Shrimp"?

    --
    Neredbojias
    Contrary to popular belief, it is believable.
    Neredbojias, Aug 14, 2005
    #4
  5. W. de Jonge

    Dan Guest

    W. de Jonge wrote:
    > Who can help me? I want to create a link(href) which opens an .doc or an
    > .xls directly in MS Word or MS Excell and not in IE so that I don't have to
    > save the document first en open it from Explorer.


    That is not something you have complete control over; it's up to the
    end-user's configuration. Your task is to ensure that the documents in
    question are served with a proper MIME type indicating what sort of
    data they are; then the user's system might display them inline if
    their browser supports it, launch an external helper application, or
    prompt to save it.

    The end user might just not have *anything* from Microsoft on his/her
    system, so it could be that the use of proprietary Word and Excel
    formats results in the site being completely inaccessible to him/her.

    --
    Dan
    Dan, Aug 14, 2005
    #5
  6. W. de Jonge

    David Ross Guest

    Re: ASCII upload? Was: Link directly to MS Word document

    Andy Dingley wrote:
    >
    > On Sat, 13 Aug 2005 08:14:07 -0700, David Ross <>
    > wrote:
    >
    > >Upload the Word or Excel file to the Web server in binary mode.

    >
    > Hmm... Don't we upload _everything_ in binary mode these days ?
    >
    > What happens to "ftp ASCII upload" in this world of XML, UTF-16 etc. ?
    > Should we be worrying about this ?
    >
    > And doesn't everyone just have broadband these days and more bandwidth
    > than the whole of IBM did until a few years ago,


    I still upload HTML and CSS files in ASCII mode. I also upload my
    UNIX scripts (KSH coded in Wordpad) and ASCII files (TXT) in ASCII
    mode. The reason is that I want these files to reside on my Web
    server (a UNIX system) with UNIX-type end-of-line (EOL) markings
    (LF), not PC-Windows-type EOL markings (CR/LF). FTP converts the
    EOL markings from the source type to the destination type when
    doing ASCII transfers. This allows me to edit the files on the
    server (via a secure Telnet session) using UNIX tools.

    I still use a dial-up connection to the Internet. Late last year,
    I saw a news item that said almost half of those in the U.S. who
    access the Internet from home do so via dial-up modems. This
    number might actually increase soon, now that the courts have ruled
    that phone and cable TV companies can charge independent ISPs
    retail rates for broadband. This means that, if I want broadband,
    I must either use Adelphia or SBC for my ISP; or I must pay them
    for an unused ISP account merely to get broadband to my current
    ISP. I like my current ISP and don't want to change. But I also
    don't want to pay for two ISP accounts to use only one.

    --

    David E. Ross
    <URL:http://www.rossde.com/>

    I use Mozilla as my Web browser because I want a browser that
    complies with Web standards. See <URL:http://www.mozilla.org/>.
    David Ross, Aug 14, 2005
    #6
  7. W. de Jonge

    Jim Moe Guest

    W. de Jonge wrote:
    > Who can help me? I want to create a link(href) which opens an .doc or an
    > .xls directly in MS Word or MS Excell and not in IE so that I don't have to
    > save the document first en open it from Explorer.
    >
    > I asked our webmaster at the office but he didn't know the answer so I hope
    > you can help me.
    >

    This depends on both the server and the browser. The server must send
    the document with a appropriate "Content-Type" header entry, such as
    application/msword for Word documents. Then your browser must have a
    corresponding entry to call the appropriate application to view the document.
    For instance, in Mozilla go to Edit: Preferences...: Navigator:
    Helper_Applications to see what is configured there.
    Firefox just asks you what application to use for an unknown file type.

    --
    jmm dash list (at) sohnen-moe (dot) com
    (Remove .AXSPAMGN for email)
    Jim Moe, Aug 15, 2005
    #7
  8. W. de Jonge

    Jim Michaels Guest

    for a file download to be forced, you are going to have to send headers
    before the file is sent out. you will need ASP or PHP. taken from
    http://www.php.net/manual/en/function.header.php


    <?php
    // We'll be outputting a PDF
    header('Content-type: application/msword'); //or application/vnd.ms-excel

    // It will be called downloaded.doc
    header('Content-Disposition: attachment; filename="downloaded.doc"');

    // The PDF source is in original.doc
    readfile('original.doc');
    ?>

    this will allow the file to be opened as an option.


    "W. de Jonge" <> wrote in message
    news:4832a$42fdf95a$d47fab21$...
    > Who can help me? I want to create a link(href) which opens an .doc or an
    > .xls directly in MS Word or MS Excell and not in IE so that I don't have
    > to save the document first en open it from Explorer.
    >
    > I asked our webmaster at the office but he didn't know the answer so I
    > hope you can help me.
    >
    > Greetz
    >
    > Willem
    >
    >
    Jim Michaels, Feb 3, 2006
    #8
  9. W. de Jonge

    Dan Guest

    Jim Michaels wrote:
    > for a file download to be forced, you are going to have to send headers
    > before the file is sent out. you will need ASP or PHP. taken from
    > http://www.php.net/manual/en/function.header.php


    That still won't *force* anything, only suggest it.

    > <?php
    > // We'll be outputting a PDF
    > header('Content-type: application/msword'); //or application/vnd.ms-excel


    If you're outputting a PDF, then it wouldn't make very much sense to
    send the content-type header for MS Word or Excel, would it?

    > "W. de Jonge" <> wrote in message
    > news:4832a$42fdf95a$d47fab21$...


    Don't top-post.

    --
    Dan
    Dan, Feb 4, 2006
    #9
    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. R. van Lieshout

    Link directly to MS Word document

    R. van Lieshout, Aug 13, 2005, in forum: HTML
    Replies:
    0
    Views:
    387
    R. van Lieshout
    Aug 13, 2005
  2. R. van Lieshout

    Link directly to MS Word document

    R. van Lieshout, Aug 13, 2005, in forum: HTML
    Replies:
    7
    Views:
    24,220
    dorayme
    Aug 14, 2005
  3. srk
    Replies:
    0
    Views:
    636
  4. srk
    Replies:
    0
    Views:
    607
  5. Michael G. Schneider

    Modifying a Word document without using Word Automation

    Michael G. Schneider, Dec 15, 2003, in forum: ASP General
    Replies:
    5
    Views:
    281
    el.c. - myLittleTools.net
    Dec 16, 2003
Loading...

Share This Page