See if this helps...
http://support.microsoft.com/kb/282830/
Programmatic access to Office VBA project is denied
SYMPTOMS
Code that is written to automate an Office application and programmatically
manipulate the Microsoft Visual Basic for Applications (VBA) environment and
object model may fail on Office with one of the following error messages:
From Visual Basic or VBA:
HRESULT = 0x800A17B4 (-2146822220) "Programmatic Access to Visual Basic
Project is not trusted"
The same code works without error on computers with Office 97 and Office
2000.
Mark Ivey