borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB Home | News Home | Forum Home | Downloads | Register | Search | PM | Profile

Previous Topic (vb6 and arguments!)Next Topic (I want to have a nested scrollable area (with buttons and controls) inside a dialog.) New Topic Post Reply
AndreaVB OnLine : VB General : How to display Office Assistant through VB Application
Poster Resource
goldenmusketeer
Level: Whizz Kid


Registered: 23-12-2004
Posts: 16
icon How to display Office Assistant through VB Application

How to display Office Assistant through VB Application

Form References I have added this ...
   Microsoft Office 9.0 Object Library

                            or

Microsoft Office 11.0 Object Library
And I wrote this code...

Dim asstnt As Office.Assistant

Private Sub Command1_Click()
    asstnt.On = True
    asstnt.Animation = msoAnimationGreeting
End Sub

But it's giving an error

Run-Time Error :'91'
Object variable or with block variable not set..

What to do

____________________________
.....Joy

09-03-2006 at 03:50 PM
View Profile Send Email to User Show All Posts | Add Comment
steve_w
Level: Moderator


Registered: 18-04-2003
Posts: 1156
icon Re: How to display Office Assistant through VB Application

Hi

I haven't tried this, but it look like you need to initialise the object. To do this see the code below

Dim asstnt As Office.Assistant

Private Sub Command1_Click()

    if asstnt is nothing then
        set asstnt = new office.assistant
    endif
    asstnt.On = True
    asstnt.Animation = msoAnimationGreeting
End Sub


Steve  

09-03-2006 at 04:16 PM
View Profile Send Email to User Show All Posts | Add Comment
goldenmusketeer
Level: Whizz Kid


Registered: 23-12-2004
Posts: 16
icon Re: How to display Office Assistant through VB Application

Thanks Steve
  
         But the problem lies somewhere else...

When I use

             Set asstnt= New Office.Assistant

It gives a compile error : "Invalid Use of New keyword"

____________________________
.....Joy

09-03-2006 at 06:56 PM
View Profile Send Email to User Show All Posts | Add Comment
steve_w
Level: Moderator


Registered: 18-04-2003
Posts: 1156
icon Re: How to display Office Assistant through VB Application

Try this link

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=2770&lngWId=1

Steve  

10-03-2006 at 08:55 AM
View Profile Send Email to User Show All Posts | Add Comment
AndreaVB OnLine : VB General : How to display Office Assistant through VB Application
Previous Topic (vb6 and arguments!)Next Topic (I want to have a nested scrollable area (with buttons and controls) inside a dialog.)New Topic Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder