Replacement for OnStart() functionality

Greetings all List-Folks…

I’ve been looking through the new documentation regarding VBA in BusObj v5. I need to replicate the concept of the BusObj.spt using the OnStart event. However, I don’t see any specific examples for this. With as many people as I am sure are using this, it would have been nice.

It’s important to note that I don’t want something like Document.Activate(). I don’t want this script to fire off every time someone opens a document. I need this script to fire off each time somebody launches the application. Thus the need for the OnStart() event, which seems to have gone away.

So, if someone can save me some time (and what’s left of my sanity… although many will tell you that it’s too late for that) and provide me some code snippets to reproduce this functionality, I would be most appreciative.

Regards,
Dave Rathbun
Integra Solutions
www.islink.com


Listserv Archives (BOB member since 2002-06-25)

Haven’t tried it but you would probably need to create an application event handler - I know you say that you don’t want something like Document.Activate() but I suspect you will need to use the Application’s DocumentActivate() which you can set with a global Add-In (Note: not the document’s event handler - which would need to be inserted into every document).

You could declare a Boolean variable (or a counter if it has some relevance) which would indicate if it was the First triggering of the Applications DocumentActivate() event. Merely set it to something different on the first time through.


Listserv Archives (BOB member since 2002-06-25)

Dave wrote:
I’ve been looking through the new documentation regarding VBA in BusObj v5. I need to replicate the concept of the BusObj.spt using the OnStart event. However, I don’t see any specific examples for this. With as many people as I am sure are using this, it would have been nice.

It’s important to note that I don’t want something like Document.Activate(). I don’t want this script to fire off every time someone opens a document. I need this script to fire off each time somebody launches the application. Thus the need for the OnStart() event, which seems to have gone away.

So, if someone can save me some time (and what’s left of my sanity… although many will tell you that it’s too late for that) and provide me some code snippets to reproduce this functionality, I would be most appreciative. ------------------------------------------------- Dave,
In order to save your sanity, this functionality is still there, just not very well documented and not very easy to find. If you take a look at the logging addin that I sent you for BusinessObjects version 5, I am capturing information when the person logs in. What you end up doing is creating an add in that starts everytime BusinessObjects starts. If you look at the code for your addin, there are at a couple of folders under the addin project. You can have Modules, Class Modules and BusinessObjects Objects. Under The BusinessObjects Objects is ThisDocument. These are events for the addin. The key event is Open. It is here that you want to include your OnStart code. This code is then run when the addin is opened, and if the Addin is opened everytime you start BusinessObjects you have the old OnStart event back. Where this is even better than the OnStart is that it captures when someone chooses Login As… from the Tools menu, the event is triggered because BusinessObjects closes the addin for the old user and reopens it for the new user.

Glenn Fredericks
Data Warehouse Analyst
glenn_fredericks@aal.org
(920) 730-4700 x4236 or 1-800 CALL AAL

Aid Association for Lutherans
4321 N. Ballard Road
Appleton, WI 54919-0001
Visit our Web site at www.aal.org or e-mail us at aalmail@aal.org

AAL… Financial services. Lutheran heritage. A powerful combination.


Listserv Archives (BOB member since 2002-06-25)

Hi Dave, I don’t think that there is a replacement from VBA, but… In version 4 you could trigger a script whenever a user opened up Business Objects. Are you aware of the same type of thing for version 5? What are the parameters that you can put in the command line of the Business Objects 5 shortcut?
Simon


Listserv Archives (BOB member since 2002-06-25)

That works. It is not easy to do, but it is ok.

Thanks Glenn.
Keep your sanity high Dave…

Jean-Pierre Percheron
jgourdon@wanadoo.fr


Listserv Archives (BOB member since 2002-06-25)