ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   trigger outlook macro from excell. (https://www.excelbanter.com/excel-programming/435407-trigger-outlook-macro-excell.html)

Atishoo

trigger outlook macro from excell.
 
I have a macro that will only run in outlook, is it possible to open outlook
and trigger that macro ("sendtasks") from excell?

Bernie Deitrick

trigger outlook macro from excell.
 
Dim ol As Object
Set ol = CreateObject("outlook.application")
Call ol.sendtasks


HTH,
Bernie
MS Excel MVP


"Atishoo" wrote in message
...
I have a macro that will only run in outlook, is it possible to open outlook
and trigger that macro ("sendtasks") from excell?




Atishoo

trigger outlook macro from excell.
 
Thanks Bernie
i get object does not support this property or method on that one!



Bernie Deitrick

trigger outlook macro from excell.
 
The macro

Sub sendtasks()
'code
'End Sub

must be in either Outlook's default project or in the ThisOutlookSession's codemodule.

HTH,
Bernie
MS Excel MVP


"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Dim ol As Object
Set ol = CreateObject("outlook.application")
Call ol.sendtasks


HTH,
Bernie
MS Excel MVP


"Atishoo" wrote in message
...
I have a macro that will only run in outlook, is it possible to open outlook
and trigger that macro ("sendtasks") from excell?







All times are GMT +1. The time now is 01:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com