PDA

View Full Version : Fix to 'ClassFactory cannot supply requested class' Error



CurryRA
03-11-2007, 04:54 PM
I had written a VBA routine to create Word Documents from an Excel Spreadsheet. When executing the CreateObject("Word.Application") statement, the routine aborted with the following error:

Run-time error '-2147221231 (800440111)':

Automation error

ClassFactory cannot supply requested class

... This just about ruined my morning... after much searching, I found an obscure reference on microsoft.public.access. There is a registry key that is set by some versions of Norton Anti-virus.

[HKEY_CLASSES_ROOT\CLSID\{000209FF-0000-0000-C000-000000000046}\InProcServer
32]
(Default)="C:\\Program Files\\Common Files\\Symantec Shared\\Script
Blocking\\ScrBlock.dll"

Once this key is deleted, the problem goes away.

May not help everyone, but it worked for me!!

mdmackillop
03-13-2007, 03:43 PM
Thanks Curry