KEMBAR78
File Dialog Automation Guide | PDF | Filename | Text File
0% found this document useful (0 votes)
101 views1 page

File Dialog Automation Guide

This code sample shows how to open a file dialog box to select a file using two different methods - the first uses the .NET OpenFileDialog class and the second uses a SAFRCFileDlg object. It sets properties like the initial directory, file filters, and restores the directory before showing the dialog and retrieving the file name.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
101 views1 page

File Dialog Automation Guide

This code sample shows how to open a file dialog box to select a file using two different methods - the first uses the .NET OpenFileDialog class and the second uses a SAFRCFileDlg object. It sets properties like the initial directory, file filters, and restores the directory before showing the dialog and retrieving the file name.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Set fd = DotNetFactory.CreateInstance(System.Windows.Forms.OpenFileDialog, System.Windows.

Forms)
fd.InitialDirectory=c:\\
fd.Filter=txt files (*.txt)|*.txt |All files (*.*) |*.*
fd.RestoreDirectory=true
fd.FilterIndex=2
fd.ShowDialog()
msgbox fd.FileName

Set objDialog=CreateObject("SAFRCFileDlg.FileOpen")
ObjDialog.OpenFileOpenDlg
OpenFile=objDialog.FileName

You might also like