exception from hresult 0x800a03ec excel
Solution
1. Create following 2 folders and make sure service account have R/W access
C:\Windows\System32\config\systemprofile\Desktop
C:\Windows\SysWOW64\config\systemprofile\Desktop
2. For any Automation client to be able to access the VBA object model programmatically, the user running the code must explicitly grant access. To turn on access, the user must follow these steps.
Office 2003 and Office XP
- Open the Office 2003 or Office XP application in question. On the Tools menu, click Macro, and then click Security to open the Macro Security dialog box.
- On the Trusted Sources tab, click to select the Trust access to Visual Basic Project check box to turn on access.
- Click OK to apply the setting. You may need to restart the application for the code to run properly if you automate from a Component Object Model (COM) add-in or template.
Office 2007
- Open the 2007 Microsoft Office system application in question. Click the Microsoft Office button, and then click Application Options.
- Click the Trust Center tab, and then click Trust Center Settings.
- Click the Macro Settings tab, click to select the Trust access to the VBA project object model check box, and then click OK.
- Click OK.
No comments:
Post a Comment