jlaverde
jlaverde

Reputation: 338

Outlook External Application/Service Start

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?

Upvotes: 0

Views: 214

Answers (1)

Alex D
Alex D

Reputation: 696

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.

Upvotes: 2

Related Questions