Object Property

Microsoft Publisher Visual Basic

expression.Object

expression    Required. An expression that returns an OLEFormat object.

Example

This example sets the value of the first shape in the active publication. For the example to work, this first shape must be an ActiveX control (for example, a check box or an option button).

Dim myObj As Object

With ActiveDocument.Pages(1).Shapes(1).OLEFormat
    .Activate
    Set myObj = .Object
End With

myObj.Value = True