OLEObject.Constructor(copy as OLEObject)

From Xojo Documentation

Constructor


OLEObject.Constructor(copy as OLEObject)

Creates a copy of the OLEObject.

Example

The following example creates a copy of the passed OLEObject using the copy constructor and opens a new Word document.

Dim word As New OLEObject("word.Application")
Dim wordCopy As OLEObject // copy constructor
wordCopy = New OLEObject(word)
wordCopy.Visible = True
wordCopy.Documents.Add