473,385 Members | 1,492 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

URL to Open Word with A Specific File

Couldn't figure out the search that would turn this answer up...

Building a company intranet web site. Need a way to click on a link,
button, whatever, on the web page and thereby launch Word or Excel with
a passed DOC or XLS file. So, on a given page, there's a hotspot to
click on that downloads a formatted DOC or XLS to the user's machine
and launches the appropriate application.

Interestingly, for me, somehow the web site was set up so that clicking
on a "traditional" file link opens the document or XLS in the browser
but not in the separate external application. Don't know what to do
about that but that's a different problem (right?).

Any ideas would be appreciated.

Randy

Jun 8 '06 #1
1 1616
Hi,

You can't tell the browser how to react to content, so to some extent
your hands are tied. You also can't tell the browser to launch an
application. You can only really tell the browser what type of content
you are sending.

If you are writing bytes to the output stream then the following maybe
of interest:

Response.Clear();
Response.ContentType = "application/msword";
Response.AddHeader(("Content-Disposition","attachment;filename=whatever.doc"));
Response.BinaryWrite(filedata);

I find this usually presents the user with a file open or save to disk
dialog. Open will usually result in the MS Office app. being opened with
the doc.

mnichols

EoRaptor013 wrote:
Couldn't figure out the search that would turn this answer up...

Building a company intranet web site. Need a way to click on a link,
button, whatever, on the web page and thereby launch Word or Excel with
a passed DOC or XLS file. So, on a given page, there's a hotspot to
click on that downloads a formatted DOC or XLS to the user's machine
and launches the appropriate application.

Interestingly, for me, somehow the web site was set up so that clicking
on a "traditional" file link opens the document or XLS in the browser
but not in the separate external application. Don't know what to do
about that but that's a different problem (right?).

Any ideas would be appreciated.

Randy

Jun 8 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Martin Lucas-Smith | last post by:
I am trying to use PHP's COM support to open a URL from within MS Word then save the document. I am using PHP5.0.3/Apache2/WindowsXP. phpinfo() confirms that COM support is enabled. ...
1
by: TPK | last post by:
Here is what I want to do with javascript. On a page with text place a javascript link that: 1) When a user clicks the link (onClick) a new browser window opens (the easy part) NewWindow =...
1
by: DP | last post by:
hi, i know how to open ms word in access, but is there a way to open a specific file?? i've a created a mail merge letter, and i want to be able to click on a button in access, and it opens...
7
by: R Reyes | last post by:
Can someone please explain to me why I can't get the MS Word Interop assembly to work in my VS2005 project? I'm trying to manipulate MS Word from my Web Form application and I can't get passed...
0
by: Niyazi | last post by:
Hi, I created application that store the data in SQL SERVER that reside on network. The client also use this application to access the resources provided with application. But is the client want...
4
by: Peppie | last post by:
Hi all, I created a button in an Access form that opens MS Word. Now I want this button also to open a specific file. How do I code this? Would it also be possible to let the user select the...
0
by: Vader | last post by:
I am new to this forum. Thanks in advance for and help. The following is what I am looking for: 1. I need help with VB code to open a MS Word (.doc) file. 2. Read lines from the MS Word (.doc)...
7
by: Peter | last post by:
ASP.NET 2.0 I am trying to open a Word document and Excel document from a dialog web page, what's the best way to do that? I have tried the following: Response.Clear();...
7
by: Peter | last post by:
I have the following code which is executed from a modal web page - it works fine on most, but on some computers the Word loads into memory but never displays. This occurs with IE6 and IE7, but...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.