I am trying to call a user defined function in Outlook VBA with eval, but script control seems not to recognize my local functions :
throws error: "Incompatible type: myFunc"
Any help ?
Code:
Public Function myFunc() As String
myFunc = "foo"
End Function
...
Dim sc As Object
Set sc = CreateObject("MSScriptControl.ScriptControl")
sc.Language = "vbscript"
MsgBox sc.Eval("myFunc()")
Any help ?