Quantcast
Channel: NetOffice - MS Office in .NET
Viewing all articles
Browse latest Browse all 1741

New Post: Ribbon - trouble setting control values programmatically

$
0
0
I'm experiencing some difficulties with customising the ribbon with NetOffice (SharpDevelop). For example, when I try to declare a Label Control as follows:

<labelControl id=""lblFirstName"" getLabel=""getLabel""></labelControl>"

and then add the following procedure:

Sub getLabel(control As Office.IRibbonControl, ByRef label)
Select Case control.ID
    Case "lblFirstName"
        label = "set to something else"
End Select
End Sub

Then SharpDevelop wouldn't let me compile, because label in getLabel has not been assigned a type - although this would be ok in VBA. When I add a type to label, like ByRef label as Object, then Office, Outlook 2007 in my case, complains because the CallBack-Signatures do not match.

Can someone give me a pointer here what I'm missing?

Viewing all articles
Browse latest Browse all 1741

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>