A
Antonio Macias
Hello all
My question is how can I call an Outlook Macro from Access
via Visual Basic?
How do I Link those programs to create an automatitation?
I want to do this because my Outlook Macro is to send and
receive mails:
Sub SendandReceive()
Dim oCtl As Office.CommandBarControl
Dim oPop As Office.CommandBarPopup
Dim oCB As Office.CommandBar
'use the Send/Receive on All Accounts action in the Tools
'menu to send the item from the Outbox, and receive new
items
Set oCB = Application.ActiveExplorer.CommandBars("Menu
Bar")
Set oPop = oCB.Controls("Herramientas")
Set oPop = oPop.Controls("Enviar y recibir")
Set oCtl = oPop.Controls("Enviar y recibir Todo")
oCtl.Execute
Set oCtl = Nothing
Set oPop = Nothing
Set oCB = Nothing
End Sub
I would like to call this macro pressing a button from my
Access Data base
Thanks in advance
Antonio Macias
Mexico City
My question is how can I call an Outlook Macro from Access
via Visual Basic?
How do I Link those programs to create an automatitation?
I want to do this because my Outlook Macro is to send and
receive mails:
Sub SendandReceive()
Dim oCtl As Office.CommandBarControl
Dim oPop As Office.CommandBarPopup
Dim oCB As Office.CommandBar
'use the Send/Receive on All Accounts action in the Tools
'menu to send the item from the Outbox, and receive new
items
Set oCB = Application.ActiveExplorer.CommandBars("Menu
Bar")
Set oPop = oCB.Controls("Herramientas")
Set oPop = oPop.Controls("Enviar y recibir")
Set oCtl = oPop.Controls("Enviar y recibir Todo")
oCtl.Execute
Set oCtl = Nothing
Set oPop = Nothing
Set oCB = Nothing
End Sub
I would like to call this macro pressing a button from my
Access Data base
Thanks in advance
Antonio Macias
Mexico City