ACC2000: How to Animate the Office AssistantID: Q198461
|
At times, you may want to animate the movements of the Office Assistant in
response to actions performed in your application. For example, you may
want to have the Assistant appear when you open a particular form. Or you
may want the Assistant to react when a certain event is triggered. This
article shows you how to do so.
The following example creates three event procedures that control the
behavior of the Clippit Assistant. The first procedure selects
Clippit and makes the Assistant visible when the Employees form is
opened. The second procedure instructs Clippit to simulate listening
to the computer when a field is updated. The third procedure closes the
Assistant when the form is closed and resets some of the properties of the
Assistant.
CAUTION: Following the steps in this example will modify the sample
database Northwind.mdb. You may want to back up the Northwind.mdb file
and perform these steps on a copy of the database.
NOTE: This example assumes you have the Clippit Assistant (Clippit.acs)
installed on your computer. By default the Assistants are installed in
the C:\Program Files\Microsoft Office\Office folder.
Private Sub Form_Open(Cancel As Integer)
With Assistant
.Filename = "Clippit.acs" ' Returns or sets the name of the
' active Office Assistant.
.Visible = True
.Animation = msoAnimationGreeting ' Simulates greeting user.
.Sounds = True
.SearchWhenProgramming = True
.FeatureTips = True
End With
End Sub
Private Sub FirstName_AfterUpdate()
With Assistant
.Animation = msoAnimationListensToComputer ' Animates
' Assistant.
End With
End Sub
Private Sub Form_Close()
If Assistant.Visible = True Then
With Assistant
.AssistWithHelp = False
.SearchWhenProgramming = False
.GuessHelp = False
.FeatureTips = False
.Visible = False
End With
End If
End Sub
For more information about using the Office Assistant, click Microsoft Access Help on the
Help menu, type "Assistant" in the Office Assistant or the Answer Wizard,
and then click Search to view the topics returned.
To see a list of file names that correspond to the different Office
Assistants, from the Visual Basic Editor, click Microsoft Visual Basic on
the Help menu, type "Filename property" in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
Additional query words: program code help asst customize modify user
Keywords : kbdta AutoOA
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: July 15, 1999