Salesforce

How Do I Pass/Receive a COM Object as a Parameter To/From a COM Object? (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

How Do I Pass/Receive a COM Object as a Parameter To/From a COM Object? (Magic xpa 3.x)

COM objects frequently pass and receive other COM objects as parameters. While this may seem a little odd when you first work with COM objects, it is very easy to do in Magic xpa. Since COM objects are just variables, you pass them as you would any other variable.

Receiving a COM Object

This example uses the MgItemSequential method that was discussed in Fetching a Collection.

Prerequisite: You must have the COM object declared within the scope of your program.

  1. Go to place where you will be sending or receiving the parameter. In this case, we are receiving a COM object as the returned value.

  2. Zoom from the Var column as you would for any other variable. Our COM object is listed, and we select it by pressing Enter.

Now, when the method is invoked, the WordApp.Language COM object will be ready for use by the next Invoke operation.

Reference
Attachment 
Attachment