Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Link directly to MS Word document

Reply
Thread Tools

Link directly to MS Word document

 
 
W. de Jonge
Guest
Posts: n/a
 
      08-13-2005
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


 
Reply With Quote
 
 
 
 
David Ross
Guest
Posts: n/a
 
      08-13-2005
"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/>.
 
Reply With Quote
 
 
 
 
Andy Dingley
Guest
Posts: n/a
 
      08-13-2005
On Sat, 13 Aug 2005 08:14:07 -0700, David Ross <(E-Mail Removed)>
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.
 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      08-14-2005
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.
 
Reply With Quote
 
Dan
Guest
Posts: n/a
 
      08-14-2005
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

 
Reply With Quote
 
David Ross
Guest
Posts: n/a
 
      08-14-2005
Andy Dingley wrote:
>
> On Sat, 13 Aug 2005 08:14:07 -0700, David Ross <(E-Mail Removed)>
> 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/>.
 
Reply With Quote
 
Jim Moe
Guest
Posts: n/a
 
      08-14-2005
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)
 
Reply With Quote
 
Jim Michaels
Guest
Posts: n/a
 
      02-03-2006
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" <(E-Mail Removed)> wrote in message
news:4832a$42fdf95a$d47fab21$(E-Mail Removed) 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
>
>



 
Reply With Quote
 
Dan
Guest
Posts: n/a
 
      02-04-2006
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" <(E-Mail Removed)> wrote in message
> news:4832a$42fdf95a$d47fab21$(E-Mail Removed) bel.net...


Don't top-post.

--
Dan

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
generating word document with header and footerwithout using word object. srk ASP .Net 0 04-25-2007 06:34 AM
generating word document with header and footerwithout using word object. srk ASP .Net 0 04-24-2007 01:59 PM
Link directly to MS Word document R. van Lieshout HTML 7 08-14-2005 02:35 PM
Link directly to MS Word document R. van Lieshout HTML 0 08-13-2005 01:59 PM
Preview image directly on PC, save directly to HD Patrick M. Digital Photography 3 01-07-2004 08:29 PM



Advertisments