Module

OLEParameter


Description

Use to pass an OLE parameter.

Properties

Name

Type

Read-Only

Shared

PassByref

Boolean

Position

Integer

Type

Integer

Methods

Name

Parameters

Returns

Shared

Value

Variant

ValueArray

Variant()

Variant()

Constants

Use the following class constants to set the value of the Type property.

Name

ParamTypeBoolean

ParamTypeChar

ParamTypeDouble

ParamTypeNull

ParamTypeSigned64Bit

ParamTypeSignedChar

ParamTypeSignedLong

ParamTypeSignedShort

ParamTypeSingle

ParamTypeString

ParamTypeUnsigned64Bit

ParamTypeUnsignedLong

ParamTypeUnsignedShort

Property descriptions


OLEParameter.PassByref

PassByref As Boolean

If True, the parameter is passed ByRef. The default is False.


OLEParameter.Position

Position As Integer

Allows you to specify which position (1-based index) that you want the parameter to be passed in.

This is akin to named parameters, if you know the position of the parameter within the function that you want to call, you can create an OLEParameter object and set its Position property to achieve the same effect. The default value is 0, which means no positioning.


OLEParameter.Type

Type As Integer

Specifies the type of the parameter.

Use the following class constants to specify the type:

Class Constant

ParamTypeBoolean

ParamTypeChar

ParamTypeDouble

ParamTypeNull

ParamTypeSigned64Bit

ParamTypeSignedChar

ParamTypeSignedLong

ParamTypeSignedShort

ParamTypeSingle

ParamTypeString

ParamTypeUnsigned64Bit

ParamTypeUnsignedLong

ParamTypeUnsignedShort

Method descriptions


OLEParameter.Value

Value As Variant

The value of the parameter. It accepts one-dimensional arrays. It has a getter and setter pair via the Assigns keyword.


OLEParameter.ValueArray

ValueArray As Variant()

The value of the parameter if the parameter is a two-dimensional array.


OLEParameter.ValueArray

ValueArray As Variant()

The value of the parameter if the parameter is a two-dimensional array.

Notes

This code launches Word and draws a curve in a new document.

Var word As New WordApplication
Var doc As WordDocument
Var param As New OLEParameter
Var pts(3, 1) As Variant
pts(0, 0) = 50
pts(0, 1) = 20
pts(1, 0) = 100
pts(1, 1) = 160
pts(2, 0) = 150
pts(2, 1) = 160
pts(3, 0) = 200
pts(3, 1) = 20

param.Type = OLEParameter.ParamTypeSingle
param.ValueArray = pts

doc = word.Documents.Add
doc.Shapes.AddCurve(param)
word.Visible = True

Compatibility

All project types on all supported operating systems.