0

Is there any way to have outlook start an external application or service based on an outlook calendar task, event, appointment? Also if so, is there a way to get it to pass parameters to it?

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
jlaverde
  • 338
  • 1
  • 2
  • 16

1 Answers1

2

Yes you can do this using the Shell method.

Private Sub TestAcrobatReader()

    Const strcProgramName As String = _
        "C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe"
    Const strcFilePath As String = _
        "C:\Program Files\Adobe\Reader 9.0\Reader\plug_ins\" _
        & "Annotations\Stamps\Words.pdf"

    Dim dblProgTaskID As Double
    Dim strPathName As String

    strPathName = strcProgramName & " " & strcFilePath
    dblProgTaskID = Shell(strPathName, vbMaximizedFocus)
    MsgBox "Program Task ID:  " & dblProgTaskID

End Sub

Code borrowed from here. You can pass additional parameters by concatenating them on the strPathName.

For automating based on Outlook Calendar there is a wealth of information here.

Alex D
  • 696
  • 6
  • 13