Most of the applications allow users to open or display an empty document. This indicates that such an application expects the user to create a document. Once a document has been created, a user would usually want to store its contents on a medium (hard drive, floppy disk, etc). Microsoft Windows provides a common dialog box for this purpose: The Save As dialog box.
To work with the Save As dialog box:
1. Create a instance of the save as dialog box
Dim SaveFileDialog1 As SaveFileDialog
SaveFileDialog1 = New SaveFileDialog
2. Specify the save file extension
SaveFileDialog1.Filter = “PDF (.pdf)|*.pdf| Word Document (*.docx)|*.docx| Word 1997-2003 Document (.doc)|*.doc | All files (*.*) |*.*”
3. Open the save file dialog box and get the save file name
If SaveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
filename = SaveFileDialog1.FileName
End If
Good blogging!