Search This Blog

Thursday, October 28, 2010

How to Fix "Word experienced an error trying to open the file." error

if you are experiencing a problem in opening MS Office documents with this error:"Word experienced an error trying to open the file" or "Word has encountered a problem" while opening a document from your hard disk or Ms Outlook:







and if you have tried to open and repair the document but the error is still there, you will have to check the  "Protected view" settings in MS Office 2010 application..

Below are the steps..

  1. Run one of the Office 2010 application (e.g. Word 2010).
  2. Click on File menu, and select Options.
  3. In the “Options” dialog, select Trust Center in the left pane.
  4. Click on Trust Center Settings in the right pane.
  5. Select Protected View in the left pane of “Trust Center” dialog.
  6. Disable any of all of the protected view options as below by unticking the check boxes:
    • Enable Protected View for files that fail validation
    • Enable Protected View for files originating from the Internet
    • Enable Protected View for files located in potentially unsafe locations
    • Enable Protected View for Outlook attachments


Ref :
http://www.mydigitallife.info/2009/12/29/how-to-disable-read-only-protected-view-in-office-2010/

Saturday, October 23, 2010

How to Change Microsoft SQL Server 2008 Default Character Set

While Setting Up Microsoft SQL Server 2008, you may find out that you have missed setting up the SQL Server Instance Character Set. this is so common as the SQL Server Setup procedure may not highlight the area of changing the character set the way you expected, so you will end up using the default character set, which is "Latin1_General_CI_AS".

So if you are in the situation where you want to change the character set immediately after the setup completion, the only 2 options you have are:

1- Uninstall/Reinstall the SQL Server Software, and select the desired character set during the setup.
2- run a command line script to change the character set at the SQL server instance level.

in this article, we will use option 2 above, which is running the command that allows you to change the character set, as follows:

Determine which character set you need to set:

Open SQL Server Management Studio --> New Query and run the following command against the master database: 

select * from fn_helpcollations()

the above query will list all the available character sets, so you need to choose one of them, in this example, I am going to choose "Arabic_CI_AI". 

Execute the command that changes the character set

open command prompt, go to the directory where you have the SQL Server 2008 setup files, you will need to choose the directory that contains "Setup.exe"

then, type in the following command:  

setup.exe /q /ACTION=RebuildDatabase /INSTANCENAME=MSSQLSERVER /SAPWD="password"
/SQLSYSADMINACCOUNTS="BUILTIN\ADMINISTRATORS" /SqlCollation=Arabic_CI_AI

Note: the above line should be a straight line with no carriage returns. You need to change the values in green with values that represents your SQL environment, mainly you need to change the Instance Name, "sa" account password and the SQL Collation Name (that you have chosen in the previous step)

execute the command, wait until it finishes executing, then , if there is no errors or validation notes, the character set will be changed as desired.

Important Note: the above procedure is for changing the collation/character set at a fresh installation of SQL Server 2008. if you already have created some custom databases and that these databases contains data, then you will have to run through a very detailed/complex procedure to change the collation.

the following article is very useful for such a case: