ControlCaptionFromID Property [Office 2003 SDK Documentation]
The ControlCaptionFromID property specifies the caption displayed in the Document Actions task pane for each control in the smart document.
Notes
- For Microsoft ActiveX controls, the ControlCaptionFromID property specifies the GUID for each ActiveX control that is displayed in the task pane. To hide an ActiveX control in the task pane, set the ControlCaptionFromID for that control to a blank string.
- Setting the ControlCaptionFromID property for a control to a blank string will hide that control in the Document Actions task pane.
- The ControlCaptionFromID property is called twice for every control that is displayed in the task pane. Therefore, complex code may have an impact on smart document performance.
Applies to
Syntax
[Visual Basic 6.0]
Private Property Get ISmartDocument_ControlCaptionFromID(ByVal ControlID As Long, ByVal ApplicationName As String, ByVal LocaleID As Long, ByVal Text As String, ByVal Xml As String, ByVal Target As Object) As String
[Visual Basic .NET]
Public ReadOnly Property ControlCaptionFromID(ByVal ControlID As Integer, ByVal ApplicationName As String, ByVal LocaleID As Integer, ByVal [Text] As String, ByVal Xml As String, ByVal Target As Object) As String Implements Microsoft.Office.Interop.SmartTag.ISmartDocument.ControlCaptionFromID
[C#]
public string ISmartDocument.get_ControlCaptionFromID(int ControlID, string ApplicationName, int LocaleID, string Text, string Xml, object Target)
[Visual C++ 6.0]
STDMETHOD(get_ControlCaptionFromID)(INT ControlID, BSTR ApplicationName, INT LocaleID, BSTR Text, BSTR Xml, IDispatch * Target, BSTR * Caption)
[Visual C++ .NET]
STDMETHOD(get_ControlCaptionFromID)(int ControlID, BSTR ApplicationName, int LocaleID, BSTR Text, BSTR Xml, LPDISPATCH Target, BSTR * Caption)
Parameters
ControlID Represents the ID number assigned to a control in the ControlID property.
ApplicationName Specifies the name of the application. You can use the ApplicationName parameter to customize a single smart document DLL to provide smart document actions in multiple Microsoft Office applications.
LocaleID Represents the language setting of the application. You can use the LocaleID parameter to specify different actions for multiple languages in a smart document.
Text The text contained in the XML element with which the control is associated.
Xml Specifies the XML element, including the markup and data, with which the control is associated.
Target Specifies the Microsoft Word or Microsoft Excel Range object that represents the XML element for which the action is defined.
Remarks
The caption that you specify using the ControlCaptionFromID property is displayed in the Document Actions task pane. A control may or may not have a caption associated with it. In addition, two or more controls may share a caption. For example, the control that has a ControlID value of 1 could share the same caption text as the control with the ControlID value of 702.
From within this method, you cannot refresh the task pane by using the RefreshPane method for the SmartDocument object. If you need to refresh the task pane, use the OnPaneUpdateComplete method.
Note The RefreshPane method and the SmartDocument object are part of the Office Word 2003 and Office Excel 2003 Visual Basic for Applications (VBA) object models.