Opening Word docs in a separate window

G

Guest

I am trying to achieve the following behaviour using IE6 to access a web
application that we have developed.

The user clicks on a document link on the web-site and the corresponding
Microsoft Word document opens in a new window in the MS Word application
(i.e. not within the IE window).

I have tried two approached to this:

1. By returning the following http header from the web app:

Content-disposition: attachment; filename="doc_186493.rtf"

This opens MS Word in a separate window but because IE is downloading an
attachment it firsts pops up a dialog saying "do you want to open or save
this file". This dialog is not acceptable to our customer but I can't find a
way to disable it.

2. By returning the following http header from the web app:

Content-disposition: inline; filename="doc_186493.rtf"

and by using Control Panel: Folder Options: File Types advanced setting for
..DOC to NOT browse in same window.

This works in that the document opens in a new window in MS Word without any
dialog. But the filename in the content disposition line is not used .
Instead the file which opens in word is the url the user clicked on i.e
"showDoc.do;jsessionid=hkdhgkj....". Having this weird file name is also
unacceptable to the customer.

Does anyone know a way of achieving what I am trying to do? Any help would
be very welcome.

BTW I know that option 2 works with Firefox but this is currently also not
acceptable to my customer.

Thanks,
Colin
 
R

Rob ^_^

Hi Colin,

To change the file name that the client sees on the download prompt you need
to stream the file back to the client. Using streaming will also allow you
to change the content-disposition.

Whether or not the client is prompted to download the file depends on the
Client windows settings. Open Windows Explorer and select the Tools>Folder
Options and on the File Types tab navigate to your file type (.rtf) and
click the Advanced button. You will find an option there to "Prompt to open
file before download". You may be able to implement a group policy to do
this on each of your client machines in your network.

Regards.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top