Pour piloter l'assistant depuis une application MS-Office:
démarrez l'éditeur
Visual Basic (Menu Outils | Macro | Macros | Visual editor).
Insérez un module
collez le code suivant et
exécutez le:
Sub voir_le_compagnon()
Assistant.Visible = True
End Sub
Le trombone est l'assistant par défaut installé par MS-Office.
Son fichier se situe dans:
\Program \Files\Microsoft Office\Acteurs\clippit.act
Vous trouverez d'autres animations sur le WEB. Pour choisir le trombone,
exécutez ce code:
Sub trombone()
Assistant.FileName = "clippit.act" 'remplacez
"clippit" par un autre nom de fichier présent dans le dossier "acteurs"
End Sub
Exemple de message simple:
Sub simple()
With Assistant.NewBalloon
.Heading = "Titre"
.Text = "Blabla"
.Labels(1).Text = "Bonjour"
.Labels(2).Text = "Au revoir"
.Show
End With
End Sub
Pour voir les animations disponibles, exécutez le code suivant pas à pas:
Sub liste_animations()
With Assistant
.Visible = True
.Animation = msoAnimationAppear
.Animation = msoAnimationBeginSpeaking
.Animation = msoAnimationCharacterSuccessMajor
.Animation = msoAnimationCheckingSomething
.Animation = msoAnimationDisappear
.Animation = msoAnimationEmptyTrash
.Animation = msoAnimationGestureDown
.Animation = msoAnimationGestureLeft
.Animation = msoAnimationGestureRight
.Animation = msoAnimationGestureUp
.Animation = msoAnimationGetArtsy
.Animation = msoAnimationGetAttentionMajor
.Animation = msoAnimationGetAttentionMinor
.Animation = msoAnimationGetTechy
.Animation = msoAnimationGetWizardy
.Animation = msoAnimationGoodbye
.Animation = msoAnimationGreeting
.Animation = msoAnimationIdle
.Animation = msoAnimationListensToComputer
.Animation = msoAnimationLookDown
.Animation = msoAnimationLookDownLeft
.Animation = msoAnimationLookDownRight
.Animation = msoAnimationLookLeft
.Animation = msoAnimationLookRight
.Animation = msoAnimationLookUp
.Animation = msoAnimationLookUpLeft
.Animation = msoAnimationLookUpRight
.Animation = msoAnimationPrinting
.Animation = msoAnimationSaving
.Animation = msoAnimationSearching
.Animation = msoAnimationSendingMail
.Animation = msoAnimationThinking
.Animation = msoAnimationWorkingAtSomething
.Animation = msoAnimationWritingNotingSomething
.Visible
= False
End With
End Sub