Opening Word docs in a separate window

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
Back
Top