Start a new topic

Call another application

Can you give me some guidance on opening a custom form from the IOM API?

I assume I will have to write a separate, compiled VB .NET application that has the form and call that from the IOM VBA.

What I am most stuck on is how to pass data back and forth between the two applications.  You had said that you used this technique during testing and I was hoping that you could help me get started.

I really just don't know what I am looking for.  Do I write a file from the form app and read it from IOM VBA?  Is there some kind of messaging that can be passed from one app to the other?

I realize this is outside of the normal scope of IOM VBA but I would really appreciate some pointers!

Thanks.


Perfect, thanks for taking the time to get me started!
Wayne,

Any outside .NET application would need to be located in your plugins folder or registered in the GAC (Global Assembly Cache). Placing your dll file in the plugins folder is an easier solution. From there you can create forms or objects using late binding.

Here is an example of late binding to create an excel object. http://msdn.microsoft.com/en-us/library/0tcf61s1(v=vs.80).aspx

My suggestion would be to create a .NET application with a public class that your API code communicates with.  Create a new object of your class and then from there call the methods on the class.   For example:

Your .NET application would contain:

Public Class MyClass

    Public Sub DoWork(ByRef data as string)
        'do work
    End Sub

End Class


Your API code would contain

Dim o as Object
o = CreateObject("MyApplicationNamespace.MyClass")
dim MyData as String = "Something"
o.DoWork(MyData)
'MyData could be something else at this point


Any changes you make to the data object in your .NET application will show up in the IOM API because it was passed in ByRef (short for by reference).
Login or Signup to post a comment