Caption Property
Description
Gets or sets the caption displayed for the item in the recent file list.
Property Type
Read-write property
Syntax (Visual Basic)
Public Property Caption() As String
Return Type
The caption displayed for the item in the recent file list.
Remarks
By default, the caption contains a blank string.
When the RecentFileListItem is added to a standard Recent File List, the caption is what is displayed for the item in the list. This is also true for the Office 2007 style list. When using the Office 2010 style list, the caption is not displayed in the list.
Office 2010 Style List
Using the Office 2010 style BackstageListBox to display the Recent File List:
Dim RecentFileList As RecentFileList
RecentFileListBox.ToolTipContext.Style = xtpToolTipResource
CommandBars.RecentFileList.Add "C:\Program Files\Test1.xml"
CommandBars.RecentFileList.Add "C:\Program Files\Test2.xml"
RecentFileListBox.CreateRecentFileListItems RecentFileList
Office 2007 Style List
Dim RibbonBar As RibbonBar
Set RibbonBar = CommandBars.ActiveMenuBar
Set ControlFile = RibbonBar.AddSystemButton
Dim PopupBar As CommandBar
Set PopupBar = CommandBars.CreateCommandBar("CXTPRibbonSystemPopupBar")
Set ControlFile.CommandBar = PopupBar
CommandBars.RecentFileList.Add "C:\Program Files\Test1.xml"
CommandBars.RecentFileList.Add "C:\Program Files\Test2.xml"
With PopupBar.Controls
Set Control = CommandBars.CreateCommandBarControl("CXTPRibbonControlSystemRecentFileList")
Control.Caption = "Recent Documents"
Control.BeginGroup = True
Control.Id = XTP_ID_FILE_MRU
.AddControl Control
End With
See Also
Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.