我试图动态填充DevExpress PopuMenu项目,但是,它只显示Items(BarButtonItem),而不显示Groups(BarLinkContainerItem):
Sub ExportToPDF()
Dim file_path As String
Dim search_range As String
Dim each_cell As Range
Dim rng1 As Range
' Set search_range as desired search range
search_range = ActiveSheet.Range("A53:R56")
Set rng1 = ActiveSheet.Range("A53:R56").Find("ProductX", , xlFormulas, xlPart)
If Not rng1 Is Nothing Then
file_path = Some_path_A
Else
file_path = Some_path_B
End If
'Export the sheet as PDF
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=file_path, Quality:=xlQualityStandard _
, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
True
End Sub
感谢。