By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,918 Members | 1,816 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,918 IT Pros & Developers. It's quick & easy.

Link directly to MS Word document

P: n/a
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
Aug 13 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
"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/>.
Aug 13 '05 #2

P: n/a
On Sat, 13 Aug 2005 08:14:07 -0700, David Ross <no****@nowhere.not>
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.
Aug 13 '05 #3

P: n/a
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.
Aug 14 '05 #4

P: n/a
Dan
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

Aug 14 '05 #5

P: n/a
Andy Dingley wrote:

On Sat, 13 Aug 2005 08:14:07 -0700, David Ross <no****@nowhere.not>
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/>.
Aug 14 '05 #6

P: n/a
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)
Aug 14 '05 #7

P: n/a
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" <w.********@hotmail.com> wrote in message
news:48***************************@cache30.multika bel.net...
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

Feb 3 '06 #8

P: n/a
Dan
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" <w.********@hotmail.com> wrote in message
news:48***************************@cache30.multika bel.net...


Don't top-post.

--
Dan

Feb 4 '06 #9

This discussion thread is closed

Replies have been disabled for this discussion.