I'm not sure that you have access to those buttons, but you can add the same filters to the open dialog and just change the "Files of type:" drop down to what you are looking for. That is what those buttons do anyway.
I understand that and that’s what I have done. Some of my users asked if the buttons can be added and I did not find anything saying if we have access or not but I think you are right that we don't.
thanks your link web.
follow code, can be open file from folder
'how to prompt the user for the name of the file to open. This example also shows how to set up filters by file types.
' Preconditions: Open the Immediate window.
' 1. The File to Attach dialog is displayed and the file
' types specified in the filter are listed.
' 2. Examine the Immediate window to verify that the
' name of the file you selected matches what the name
' of the printed to the Immediate window.
Private Sub OpenDocument()
'SolidWorks Forums: Using quick filter in open file dialog?
Dim T: T = Timer
Dim Path, FileName, Filter
Dim fileConfig As String, fileDispName As String, fileOptions As Long
Dim SwApp As SldWorks.SldWorks, SwDraw As DrawingDoc
Set SwApp = GetObject(, "SldWorks.Application")
Filter = "SolidWorks Files (*.sldprt; *.sldasm; *.slddrw)|*.sldprt;*.sldasm;*.slddrw|Filter name (*.fil)|*.fil|All Files (*.*)|*.*|"
FileName = SwApp.GetOpenFileName("File to Attach", "", Filter, fileOptions, fileConfig, fileDispName)
Set SwDraw = SwOpenFile(SwApp, FileName)
Dim ss, h, m
ss = Timer - T
h = Int(ss / 3600)
m = Int((ss Mod 3600) / 60)
ss = Int(ss Mod 60)
Debug.Print h & "时:" & m & "分:" & ss & "秒"
MsgBox h & "时:" & m & "分:" & ss & "秒"
Function SwOpenFile(SwApp, OpenFile)
' SwApp.Visible = True
Dim SwModel As Object
Dim nDocType As Long
Dim nErrors As Long
Dim nWarnings As Long
swOpenDocOptions_Silent = 1
' Determine type of SolidWorks file based on file extension
If InStr(LCase(OpenFile), "sldprt") > 0 Then
nDocType = 1 'swDocPART
ElseIf InStr(LCase(OpenFile), "sldasm") > 0 Then
nDocType = 2 'swDocASSEMBLY
ElseIf InStr(LCase(OpenFile), "slddrw") > 0 Then
nDocType = 3 'swDocDRAWING
' Probably not a SolidWorks file...
nDocType = swDocNONE
'...so the file cannot be opened
Set SwModel = SwApp.OpenDoc6(OpenFile, nDocType, _
swOpenDocOptions_Silent, "", nErrors, nWarnings)
'SwApp.Visible = True
Set SwOpenFile = SwModel