Calling Outlook VBA Macro from outside (VB/VBScript/C#)
It seems to be insignificant but it might turn out to be useful some times.
Consider a situation where you have a VBA Macro in outlook (any office application for that matter) the name of the subroutine is SendCustomEmail and you want it to call from outside the outlook (it should be running or you can make it run).
The sample code to call SendCustomEmail here is in vbscript.
set app= createobject("Outlook.Application")
call app.SendCustomEmail(" firstname.lastname@example.org ")
You will have to write subroutine SendCustomEmail with a parameter in outlook macro.
It is easy in VBScript or VB for that matter as we can directly make use of the late binding.
In case of .Net here in C#
outlook = new Microsoft.Office.Interop.Outlook.ApplicationClass();
mtype = outlook.GetType();
strArr = new string;
strArr = " email@example.com ";
Similarly we can also call Macro written in word, excel etc.
Hope this turn up to be useful some where.
An obstacle is what we see when we take our eyes off the goal.