I am attempting to call an Outlook macro from Excel and pass two or more arguments to it. I have successfully passed 1 argument with the following code:
Dim OutApp As Object
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Dim Arg1 As String
Dim Arg2 As String
Arg1 = "A"
Arg2 = "B"
OutApp.TempTest (Arg1)
where TempTest is the Outlook procedure. I've attempted to add the 2nd argument by replacing the last line of code with
OutApp.TempTest (Arg1, Arg2)
but as soon as I finish typing I get a Compile error: Expected: =
I've seen posts where someone is passing to Excel or Access and uses the Run method, but Outlook does not support that.