“An Error Has Occurred In The Script On This Page” When Opening Outlook 2013

This error happened on one of my client machines today. Every time Outlook 2013 was opened this error would pop up:

Script Error: An error has occurred in the script on this page

Line: 278

Char 1

Error: Library not Registered

Code: 0

URL: outlook:800101011800000004392D05AC0000001C392D05000000002E4_ CD7F184C73E49B334A9369ADC7757228000000000000038A1BB1005E5101AA1_
BB08002B2A56C200006D737073742E646C6C00000000004E495441F9BFB8010_
0AA0037D96E0000000043003A005C00550073006500720073005C004D00690_
07400630068005C0041007000700044006100740061005C004C006F006300610_
06C005C004D006900630072006F0073006F00660074005C004F00750074006C_
006F006F006B005C004F00750074006C006F006F006B002E007000730074000000

Do you want to continue running scripts on this page?

These sort of errors can be caused by bad or corrupt add-ons so I started outlook in safe mode using outlook.exe /safe in a run box but still I got the script error.

I noticed that Outlook 2013 was opening to personal folders by default.

I changed the default opening folder to Inbox instead. (See: How to change default startup folder in outlook)

Then when I opened outlook it opened normally. If I selected personal folders the script error occurred again.

So it turns out this error is something to do with the personal folders.

I decided to do an online repair.

After that the error was fixed. I am not really sure what caused this error, but it seemed to fix it. If anyone knows how to the reason behind this error please let me know.