Assistant Property

Applies To   Application object.

Description

You can use the Assistant property to return a reference to the Assistant object.

Setting

[application.]Assistant[.method or property]

The Assistant property uses the following settings.

Setting

Description

application

Optional. The Application object.

Assistant

Required. When used without specifying a method or property, returns the Assistant object's Item property.

method or property

A method or property of the Assistant object.


The Assistant property is available only by using Visual Basic.

Remarks

Once you establish a reference to the Assistant object, you can access all the properties and methods of the object. You can set a reference to the Assistant object by clicking References on the Tools menu while in module Design view. Then set a reference to the Microsoft Office 8.0 Object Library in the References dialog box by selecting the appropriate check box. Microsoft Access can set this reference for you if you use a Microsoft Office 8.0 Object Library constant to set an Assistant object's property or as an argument to an Assistant object's method.

See Also   Assistant object, Item property (Assistant, BalloonLabel, and BalloonCheckbox objects) ("Microsoft Office Language Reference" in Volume 5).

Example

The following example uses the Assistant property of the Application object to manipulate various properties and methods of the Assistant object. To try this example, paste the following code into the Declarations section of a standard module. Create a reference to the Microsoft Office 8.0 Object Library by using the References dialog box, available by clicking References on the Tools menu. Then click anywhere inside the procedure and press F5 to run it.

Sub AnimateAssistant()
    Dim blnState As Boolean
    With Assistant
        ' Save Assistant's visible state.
        blnState = .Visible
        ' Make Assistant visible.
        If blnState = False Then .Visible = True
        ' Animate Assistant.
        .Animation = msoAnimationAppear
        ' Display Assistant object's Item and FileName properties.
        MsgBox "Hello, my name is " & .Item & ". I live in " & .FileName, , _
            "Assistant Information:"
        ' Return Assistant's visible state to original setting.
        .Visible = blnState
    End With
End Sub