Can anyone tell me how to run a macro from Outlook, Word or Excel from Access 2000 using VBA? Thank you.
Printable View
Can anyone tell me how to run a macro from Outlook, Word or Excel from Access 2000 using VBA? Thank you.
You can add a reference to whatever Office app your wanting to run a macro of.
HTHVB Code:
'Add reference to MS Excel xx.0 Object Library Private Sub Command1_Click() Dim oApp As Excel.Application oApp.Workbooks.Open "Book1.xls" oApp.Visible = True oApp.Run "MyMacro", "Argument1", "Argument2" ', etc. End Sub
Thanks very much!
No prob. Anytime.
Ps, dont forget to Resolve this thread as a courtesy to other members.
:thumb: