comGetObject {rcom}R Documentation

Get Access to Existing COM Objects

Description

Tries to find a running instance of the specified progid and returns this object.

Use this function to use services provided by an already running application, e.g. the currently visible instance of Microsoft Excel.

The object will be released automatically when the last reference to the object is removed. To speed up this process, assign some NULL value as soon as you don't need the object any more.

Usage

comGetObject(progid)

Arguments

progid ProgId of COM object to get access to, e.g. "Excel.Application"

Value

comGetObject returns an object of class "COMObject".

Author(s)

Thomas Baier

Examples

# get access to excel
## Not run: x<-comGetObject("Excel.Application")

# and make it visible
## Not run: comSetProperty(x,"Visible",TRUE);

# do something now...

[Package rcom version 2.2-1 Index]