in reply to DBD::ODBC, Access DB, calling a VB function
This works... I had my code run by my macro simply write to a file on my C:\ drive and it worked fine... just poke around the Object browser some more and see if you can find a way to invoke RunCode however I don' think you can.#!/perl -w use strict; use Win32::OLE; use Win32::OLE::Const; my $accessConst = Win32::OLE::Const->Load('Microsoft Access 8.0 Object + Library'); my $app = Win32::OLE->new('Access.Application') or die "$!"; $app->OpenCurrentDatabase('C:/test.mdb'); $app->DoCmd->RunMacro('Macro1'); $app->DoCmd->Quit($accessConst->{'acQuitSaveNone'});
|
|---|