Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a new button on BO toolbar 1

Status
Not open for further replies.

tlek

Programmer
Mar 7, 2001
1
0
0
US
Hi,
I'm currently using VB 6.0 to access the BO repository to retrieve and open a report. Now I want to create a button on the BO toolbar, so once the button is click it will open the VB application. Is it posible to add new toolbar in BO, please let me know. Thanks, I apreciate.

Tung
 
Tung, I do not think that it is possible to create tool bar buttons for BO. The only way that I know of is if you have the VB script embedded in the BO report itself. You can then just click on the VB editor button on the VB toolbar and it will bring up your script. You can also assign the script to a macro button that is also on the vb toolbar.

Sorry if this was not any help
 
Tung,

Samples of how to add a button to the existing toolbar are included in the BO SDK.

Typically, the buttons are added via a routine included in an established REA file (add-in file). You must determine the indexes used by the existing toolbars to determine what the next available index number will be.

A sample of a adding a button to a toolbar is as follows:

Sub Add_BCA_Email_to_Menu()

Set BO_CmdbarControl = Application.CmdBars.Item(1).Controls.Item("&Tools").Controls.Add(1, , 15)
BO_CmdbarControl.Caption = "A&ttach to Email..."
BO_CmdbarControl.OnAction = ThisDocument.Name & Right(ThisDocument.FullName, 4) & "!InsertCode"
Application.Clipboard.SetData LoadPicture(ThisDocument.Path & "\mail.bmp")
BO_CmdbarControl.PasteFace

Set BO_CmdbarControl = Application.CmdBars.Item(2).Controls.Item("&Tools").Controls.Add(1, , 15)
BO_CmdbarControl.Caption = "A&ttach to Email..."
BO_CmdbarControl.OnAction = ThisDocument.Name & Right(ThisDocument.FullName, 4) & "!InsertCode"
Application.Clipboard.SetData LoadPicture(ThisDocument.Path & "\mail.bmp")
BO_CmdbarControl.PasteFace

Set BO_CmdbarControl = Application.CmdBars.Item(5).Controls.Add(boControlButton, , 24)
BO_CmdbarControl.Caption = "A&ttach to Email..."
BO_CmdbarControl.OnAction = ThisDocument.Name & Right(ThisDocument.FullName, 4) & "!InsertCode"
Application.Clipboard.SetData LoadPicture(ThisDocument.Path & "\mail.bmp")
BO_CmdbarControl.PasteFace

Application.CmdBars("Standard").Controls(25).Caption = "Attach BCA Documents to EMail"
Application.CmdBars("Standard").Controls(25).TooltipText = "Attach BCA Documents to EMail"
Application.CmdBars("Standard").Controls(25).DescriptionText = "Attach BCA Documents to EMail"

End Sub

This sub routine is called on the Document_Open event

Private Sub Document_Open()
Call Add_BCA_Email_to_Menu
End Sub


You must also have a bitmap file to paste onto the toolbar button, and an established sub or function to call upon pressing the button.
 
I subscribe the RMALSICH reply, you need the BO SDK. Thanks a lot, bye.
Averno, Italy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top