Visual Basic (Declaration)
Function AddNamedCommand2 ( _
<InAttribute> AddInInstance As AddIn, _
<InAttribute> Name As String, _
<InAttribute> ButtonText As String, _
<InAttribute> Tooltip As String, _
<InAttribute> MSOButton As Boolean, _
<InAttribute> <OptionalAttribute> Bitmap As Object, _
<InAttribute> <OptionalAttribute> ByRef ContextUIGUIDs As Object(), _
<InAttribute> <OptionalAttribute> Optional vsCommandStatusValue As Integer = 3, _
<InAttribute> <OptionalAttribute> Optional CommandStyleFlags As Integer = 3, _
<InAttribute> <OptionalAttribute> Optional ControlType As vsCommandControlType = vsCommandControlType.vsCommandControlTypeButton _
) As Command