This project has moved and is read-only. For the latest updates, please go here.

Can't access the property NetOffice.ExcelApi.Application.VBE

Jan 15, 2013 at 10:04 AM


Yesterday I decided to migrate on VS2012 + Office 2013 (RTM) + Windows 7 and since i haven't been able to access the VBE property.

Each time I get an exception :
-  InnerException {"Exception from HRESULT: 0x800A03EC"} System.Exception {System.Runtime.InteropServices.COMException}

Stack Trace:
   at NetOffice.Invoker.PropertyGet(COMObject comObject, String name, Object[] paramsArray)
   at NetOffice.ExcelApi._Application.get_VBE()
   at CallSite.Target(Closure , CallSite , Object )
   at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
   at Microsoft.CSharp.RuntimeBinder.DynamicMetaObjectProviderDebugView.TryGetMemberValue[T](T obj, String propName, Type accessibilityContext, Boolean isResultIndexed)

Note: Access to VBA object model is trusted.

Is this a known issue?

Thank you,


Jan 15, 2013 at 10:12 AM

Oki :) I found my answer!

Apparently the Handle.AutomationSecurity = MsoAutomationSecurity.msoAutomationSecurityByUI is preventing me from accessing the VBE property...