this works fine -
Access.Application acApp = new Access.ApplicationClass();
acApp.OpenCurrentDatabase(@"C:\temp\db1.accdb",false ,null);
object oMissing = System.Reflection.Missing.Value;
acApp.Run("ABC",ref oMissing,ref oMissing,ref oMissing,ref oMissing,
ref oMissing,ref oMissing,ref oMissing,ref oMissing, ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing
,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing ,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing
,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing ,ref oMissing,ref oMissing);
acApp.Quit();
but I need to pass a few parameters to ABC
acApp.Run("ABC('par1', 'par2')", .... or acApp.Run("ABC 'par1', 'par2'", ..... generate error message "Could not find method ABC('par1', 'par2')
Replies
Know the answer? Post it — somebody with the same question will find it here.