Monday, August 5, 2013

SharePoint Word Web App cannot open this document for viewing because of unexpected error. To view this document open it in Microsoft Word

Here is the one of the strange issue i cam acoross in my SharePoint environment.

When we try to open the documents / power point files in SharePoint site i see its not opening some of the files and throwing the below error and the same is working for other files.

NOTE : this issue is only when you try to open the document within the browser. if you check in google it will give you some different message.






Below are the error details :
Word Web App cannot open this document for viewing because of unexpected error. To view this document open it in Microsoft Word

Resolution : 
There are couple of resolution for this. below are the details one of these can work out for different scenarios.
1. Download such issue causing documents and change the latest version of the MS Office installed in your local machine then rename and again upload to the same location will work.

2. This might be a caching issue with in sharepoint.

  1. Every "Web App" have one site collection dedicated for Office Web App Cache except central admin.
  2. Office Web App settings are Shared within a particular Web App (even if site collections on the Web App have different Content Data Base), so plan office web app cache per web app.
  3. To set size of cache or delete the cache you need to use powershell
  4. Go to CA -> Application management -> View all site collections -> selete you web application and then
  5. check for site collection with URL /sites/Office_Viewing_Service_Cache and make sure it is there.
  6. Then open https://{webapp url }/sites/Office_Viewing_Service_Cache/cache here you will see the cached files of this web application. All these should be deleted using PowerShell.
3. Try adding some web.config entry to get rid of this issue like below :
<compilation optimizeCompilations="true">

try for any of the above solution one those might work for you.

Thank you !!


No comments:

Post a Comment