Old Word 97 Macro

M

MIG

I've rediscovered an old Word 97 document with some macros in it, one
of which won't work in Word 2000. Maybe there are some object
libraries which are different, but I am not clued up on what libraries
there are and so on.

The macro involves an office assistant and balloons as follows, so can
anyone spot where objects are being used that I should refer to
differently?

Private Sub CommandButton111111_Click()
Dim bln As Balloon
Dim bln2 As Balloon
Dim bln3 As Balloon
userstate = Assistant.Visible
Set bln = Assistant.NewBalloon
Set bln2 = Assistant.NewBalloon
Set bln3 = Assistant.NewBalloon
Assistant.Visible = True
bln.Heading = "What would you like to do?"
bln.Checkboxes(1).Text = "kill this f***ing useless Office Assistant
very painfully"
bln2.Heading = "I promise never to bother anyone again"
bln3.Heading = "Thank you for sparing my life; now I will hang around
you forever"
bln.Show
If bln.Checkboxes(1).Checked = True Then
Assistant.Animation = msoAnimationGoodbye
bln2.Show
Else
Assistant.Animation = msoAnimationCharacterSuccessMajor
bln3.Show
End If
Assistant.Visible = False
End Sub
 
M

MIG

I've rediscovered an old Word 97 document with some macros in it, one
of which won't work in Word 2000. Maybe there are some object
libraries which are different, but I am not clued up on what libraries
there are and so on.

The macro involves an office assistant and balloons as follows, so can
anyone spot where objects are being used that I should refer to
differently?

Private Sub CommandButton111111_Click()
Dim bln As Balloon
Dim bln2 As Balloon
Dim bln3 As Balloon
userstate = Assistant.Visible
Set bln = Assistant.NewBalloon
Set bln2 = Assistant.NewBalloon
Set bln3 = Assistant.NewBalloon
Assistant.Visible = True
bln.Heading = "What would you like to do?"
bln.Checkboxes(1).Text = "kill this f***ing useless Office Assistant
very painfully"
bln2.Heading = "I promise never to bother anyone again"
bln3.Heading = "Thank you for sparing my life; now I will hang around
you forever"
bln.Show
If bln.Checkboxes(1).Checked = True Then
Assistant.Animation = msoAnimationGoodbye
bln2.Show
Else
Assistant.Animation = msoAnimationCharacterSuccessMajor
bln3.Show
End If
Assistant.Visible = False
End Sub



Sorry to reply to myself. I realise that in Word 2000 it doesn't work
if the Help option to use the office assistant is switched off. In
Word 97 it worked in every case. Is there a way of switching the Help
option on in VBA (and checking whether it is)?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top