Last post Sep 29, 2008 08:06 AM by EuroPhil
Aug 13, 2008 05:06 AM|EuroPhil|LINK
Am having problems with opening downloaded Word doc in same window, it works fine for PDFs, JPGs etc but not Word/Excel (2008).
However, Word/Excel seems to ignore it and gives the Open/Save dialogue so that Open will do so in a new application, not within the browser. There's no special overriding MIME mappings on the site itself and nothing specifically set up within IE7 - same
thing happens with FireFox anyway, so it seems as though Office has highjacked the ownership and opening of its documents, even though it's specified explicitly inline within the TransmitFile.
Has anyone else had this problem? Might be missing something obvious, but this appears to be a major flaw with Office!
Aug 13, 2008 02:26 PM|DavidKiff|LINK
How would the browser know its a word document? Try adding :
Response.ContentType = "application/ms-word"
Just a thought.
Aug 15, 2008 02:58 AM|EuroPhil|LINK
Sorry, should have included all code, good point but it does allocate the ContentType in a separate part of the code. The problem is not the loading of the doc with the correct app, it is the loading of the doc in a new app window rather than the same browser
I tried using Word 2008 MIME type as per Sunil's blog on subject (for PDFs, which as stated work fine)
Response.ContentType = "application/vnd.ms-excel"
Still no joy though, am abroad with limited access but have now found out still a problem with Word 2003 etc anyway.
Any other thoughts anyone?
Aug 15, 2008 04:40 AM|DavidKiff|LINK
You cant force it to open within the browser. This is a setting in excel ("Tools" menu -> "Folder Options" -> select "XLS" -> click "Advanced" -> and disable "Browse in same window"). Its up to the client how they wish to open it !
Aug 15, 2008 04:42 AM|DavidKiff|LINK
Office has highjacked the ownership and opening of its documents
When you install excel is maps all .xsl with the excel program, people wouldnt want to double click on an excel file to find it opens with IE! Youmight find this helpful:
Sep 29, 2008 08:06 AM|EuroPhil|LINK
Hi David, thanks for your attention, apologies for delay, not a solution yet.
Yes, naturally this is where the user sets their preference of browsing and they should be able to, however it is suddenly applied differently in Office 2007 rather than 2003. If the user is in a browser and click on a link, they are indicating they don't
mind opening inside the browser (if the application is able to), otherwise they could right-click and save or choose option etc. There is no "right" decision as to what should happen here, just a choice and/or perspective (which was forcibly changed by Office
So, to try and set accordingly. Incidently, you mean your Tools -> Folder Options is in Explorer, not Excel. Sometimes the option is not available on client machine due to Domain Policy, which is fair enough. However its completely removed from Vista, even
via Control Panel -> Folder Options! Have checked and this applies even when not a domain machine. Haven't figured out a way around that yet, hope its not another "dumbing down" on vista (like backup). Oh, it is - just search for "browse in same window". Thanks,
Anyway, have tried on 2 XP machines and it made absolutely no difference! Office 2007 still opens in new application, not browser! I set it both for .xls and .xlsx (2007 version).
The link you kindly provide is useful for confirmation, note he also advises a registry key update to set to "ease app upgrade" to 2007. I tried that but the
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Excel.Sheet.8] "BrowserFlags"=dword:00000000 doesn't exist (even on XP, let alone Vista) so don't want to add it if it advises updating. Unfortunately, his MSDN blog is now
closed for comments too...
Hmm, overall I think this important change could have been controlled better.
Using the compatibility pack seems to bring even more problems -
http://support.microsoft.com/kb/925424 is somewhat contradictory, still no help anyway.
Still not able to use the ASP.NET inline to open up Word/Excel/Office 2007 in the browser. Or, in fact, a plain old boring link to a 2007 doc. Seems like Microsoft has switched it because they don't want to make it run inside browser at all. I'm sure there's
a way (even if a ridiculous one involving registry key which is going to be great to advise clients! I'm not anti-microsoft, but this is unnecessarily awkward).
Has ANYONE MANAGED TO??