Front Page

 
Help!
   Life | The Universe | Everything | Advanced Search
Front Page
Read
Talk
Contribute
Feedback
Who is Online



or register to join or start a new conversation.

3. Everything / Maths, Science & Technology / Computers
Using the Office Assistant (Clippit) in Visual Basic

Add your Opinion!

There are tens of thousands of h2g2 Guide Entries, written by our Researchers. If you want to be able to add your own opinions to the Guide, simply become a member as an h2g2 Researcher. Tell me More!

Entry Data
Entry ID: A1102870 (Edited)
Written and Researched by:
Bob McBob

Edited by:
The H2G2 Editors
Date: 15   July   2003
Text only
Like this page?
Send it to a friend


Referenced Sites
Information Technology - BBC Learning

Please note that Not Panicking Ltd is not responsible for the content of any external sites listed.


The Office Assistant (Clippit) is that annoying paperclip in Microsoft Office programs. To control the Office Assistant, you will need a Microsoft Office program with the Office Assistant. You can use Clippit in a computing project, for example instead of a message box, or in a Macro. You will be able to control the Office Assistant using the Visual Basic Editor.

Getting Started

If you are using Clippit in a project, you will probably already have somewhere to put the code. Otherwise, follow these steps to create a new macro for you to work with:

  1. Click on Tools, Macros and Record New Macro. Give the macro a really nice name, and Click OK
  2. Click on the Stop (Square) Button
  3. Click on Tools, Macros and Macros
  4. Click on Edit

You can swap between editor and main program by pressing Alt+F11.

Animating the Assistant

To animate Clippit, Type:

Assistant.Animation =

At this point, a drop-down list should appear. Select the animation you want from the list. To show the animation either click on the Play button, click on Run, Run Sub, or press F5.

Making the Assistant Speak

Type:

Dim Bln As Balloon
Set Bln = Assistant.NewBalloon
With Bln

.Heading = "A heading"
.Text = "Some text"
other options go here (optional)
.Show

End With

To show the balloon either: click on the Play button; click on Run, Run Sub; or press F5.

Making Multi-lined Text

Insert:

" + Chr(13) + "

... where needed. For example:

.Heading = "I can write a heading..." + Chr(13) + "An put it on as many lines" + Chr(13) + "As I want!"

This would look like:

I can write a heading...
And put it on as many lines
As I want!

Icon

Type in the other options go here part:

.Icon =

... and select an icon from the list.

Buttons

In the other options here part, type on a separate line:

.Button =

... and select a button set from the list which is displayed.


You can use this information by replacing:

.Show

End With

... with:

Dim r as Integer
r = .Show

End With if r = msoBalloonButtonOK then

Insert your own code here

end if if r = msoBalloonButtonNo then

Insert your own code here

end if
etc

Depending on the button set you used, you can type 'msoBalloonButtonAbort', 'msoBalloonButtonBack', 'msoBalloonButtonCancel', 'msoBalloonButtonClose', '-Ignore', '-Next', '-No', '-OK', '-Options', '-Retry', '-Search', '-Snooze', '-Tips', '-Yes' or '-YesToAll'.

You can also use the numbers 1 - 5 (for results from labels, see below) and 'msoBalloonButtonNull' for when the balloon closes when you click on something else (see balloon mode, below).

Labels

You can use up to five labels to display a bullet list, numbered list or blue option buttons. For each label, type:

.Labels(A number between 1 and 5).Text = "Label Text"

... in the other options go here part.


To choose what type of labels these are, also include:
.BalloonType =

... and select an item from the list.

Checkboxes

Into the other options go here part, type:

.Checkboxes(a number between 1 and 5).Text = "Checkbox text" .Checkboxes(a number between 1 and 5).Checked = True OR False

To use this information, replace:

.Show

... with

.Show
if .Checkboxes(a number between 1 and 5).Checked then

Insert your own code here

end if
if .Checkboxes(a number between 1 and 5).Checked then

Insert your own code here

end if
etc

Balloon Mode

Into the other options go here part, type:

.Mode =

... and select an option.

  • msoModeAutoDown - Allows you to click away from the balloon to close it

  • msoModeModal - Default


Discuss this Entry  People have been talking about this Guide Entry. Here are the most recent Conversations:

Clipped (Last Posting: Mar 10, 2007)

Click here to see more Conversations



Please note that Not Panicking Ltd is not responsible for the content of any external sites listed. The content on h2g2 is created by h2g2's Researchers, who are members of the public. Unlike Edited Guide Entries, the content on this page has not necessarily been checked by a h2g2 editor. In the event that you consider anything on this page to be in breach of the site's House Rules, please click here .


About | Help | Terms of Use