Linking Infopath Toolbar Buttons to VBScripts embedded in Template

I've been looking at the MS examples of creating custom Toolbar buttons, however they do not show how to link them to actual scripts embedded in the Form. I've been able to create the buttons themselves, I just need to link them to the proper VBScript functions I've created.

Does someone have an example for me to look at?

thanks in Advance,

[364 byte] By [GlenBartlett] at [2008-2-10]
# 1
Hi Glen,

If you add a "test" button in your manifest.xsf using:
<xsf:toolbar caption="Sales Report" name="Sales Report">
<xsf:button name="test" caption="test"></xsf:button>
</xsf:toolbar>

You can then use:
Sub test_OnClick()
XDocument.UI.Alert("Hello World!")
End Sub

Hope that it helps.

Franck Dauch

FranckDauch at 2007-9-9 > top of Msdn Tech,Microsoft ISV Community Center Forums,Visual Basic for Applications (VBA)...