I am using this code to to generate a crystal report from aa sql string that i construct using a supplied table name and some column names in txtSQL.This code contains functionality to export to ms word.However when the save dialog comes up and the user enters the intended filename.and saves the document.when the user attempts to open the document they have to use"open with" because the save dialog does not add an extension to the file so my question is how can i add an extension for tthe user programmatically.This is my first time using save dialog
Dim rpt As New MembersReport()
sfdSaveMe.ShowDialog()
Dim strExportFile As String = sfdSaveMe.FileName
Dim sql_personnel As String = procesSQL(txtSQL.Text, cmbTableName.Text)
Dim dt As New DataTable
dt = MyFormz.cl_Class.SelectRows_B(sql_personnel, "CMS2010051005")
ReportTitle = rpt.ReportDefinition.Sections(0).ReportObjects("txtReportTitle")
ReportTitle.Text = strTitle
rpt.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile
rpt.ExportOptions.ExportFormatType = ExportFormatType.WordForWindows
Dim objOptions As DiskFileDestinationOptions = New DiskFileDestinationOptions()
objOptions.DiskFileName = strExportFile
rpt.ExportOptions.DestinationOptions = objOptions
rpt.SetDataSource(dt)
rpt.Export()
CrystalReportViewer1.ReportSource = rpt
objOptions = Nothing
rpt = Nothing