S
Siddharthad
Hello,
I am trying to run a shared macro (in office11\xlstart\personal.xls) from
ASP .net application.
In my function I am using the following code to execute the macro, but it is
unable to locate the macro and erroring out.
private void a()
{
RunMacro(objApp, new Object[]{@"C:\Program Files\Microsoft
Office\OFFICE11\XLSTART\personal.xls!FormatGrid"});
}
private void RunMacro(object oApp, object[] oRunArgs)
{
oApp.GetType().InvokeMember("Run",
System.Reflection.BindingFlags.Default
|System.Reflection.BindingFlags.InvokeMethod,
null, oApp, oRunArgs);
}
The code errors out with the following inner exception.
The macro 'C:\Program Files\Microsoft
Office\OFFICE11\XLSTART\personal.xls!FormatGrid' cannot be found.
If I take out the fully qualifying path and run with only formatGrid, it
still cannot recognize the macro.
Can anybody help?
Thanks in advance!
Sidd
I am trying to run a shared macro (in office11\xlstart\personal.xls) from
ASP .net application.
In my function I am using the following code to execute the macro, but it is
unable to locate the macro and erroring out.
private void a()
{
RunMacro(objApp, new Object[]{@"C:\Program Files\Microsoft
Office\OFFICE11\XLSTART\personal.xls!FormatGrid"});
}
private void RunMacro(object oApp, object[] oRunArgs)
{
oApp.GetType().InvokeMember("Run",
System.Reflection.BindingFlags.Default
|System.Reflection.BindingFlags.InvokeMethod,
null, oApp, oRunArgs);
}
The code errors out with the following inner exception.
The macro 'C:\Program Files\Microsoft
Office\OFFICE11\XLSTART\personal.xls!FormatGrid' cannot be found.
If I take out the fully qualifying path and run with only formatGrid, it
still cannot recognize the macro.
Can anybody help?
Thanks in advance!
Sidd