C++Builder如何调用access里面的宏??
宏已经做好,就是不知道该如何调用,请知道的不吝赐教
[解决办法]
简单例子:
Variant vAccess;// open the Access application}try{ vAccess = GetActiveOleObject("Access.Application");}catch(...){ vAccess = CreateOleObject("Access.Application");}// 显示Access界面,如需隐藏,将参数换为falsevAccess.OlePropertySet("Visible", true);// 打开数据库char lpMdbFile[] = "D:\\ccrun\\123.mdb";vAccess.OleProcedure("OpenCurrentDatabase", lpMdbFile, true);vAccess.OlePropertyGet("DoCmd").OleProcedure( "RunMacro", "宏的名称");//// ...