Sub MAIN Begin Dialog UserDialog 480, 214, "Begin a Report" Text 10, 6, 91, 13, "Report Title", .Text1 TextBox 10, 22, 448, 18, .TextBox1 Text 10, 46, 51, 13, "Author", .Text2 TextBox 10, 62, 228, 18, .TextBox2 Text 10, 86, 116, 13, "Document Title", .Text3 TextBox 10, 102, 228, 18, .TextBox3 GroupBox 285, 52, 142, 76, "Report Type" OptionGroup .OptionGroup1 OptionButton 303, 72, 97, 16, "&Financial", .OptionButton1 OptionButton 302, 90, 104, 16, "&Marketing", .OptionButton2 OptionButton 303, 106, 104, 16, "&Technical", .OptionButton3 CheckBox 13, 128, 191, 16, "Include &Web Address", .CheckBox1 OKButton 141, 181, 88, 21 CancelButton 254, 181, 88, 21 TextBox 37, 150, 420, 18, .TextBox4 End Dialog Dim Dlg1 As UserDialog Dim Dlg2 As DocumentStatistics GetCurValues Dlg2 Dlg1.TextBox1 = Dlg2.Title Dlg1.TextBox2 = Dlg2.LastSavedBy Dlg1.TextBox3 = Dlg2.FileName ReturnValue = Dialog(Dlg1) If ReturnValue = 0 Then Goto OuttaHere Select Case Dlg1.OptionGroup1 Case 0 FileTemplates .Template = "finance.dot" Case 1 FileTemplates .Template = "market.dot" Case 2 FileTemplates .Template = "technic.dot" End Select StartOfDocument Insert Dlg1.TextBox1 InsertPara Insert Dlg1.TextBox2 InsertPara Insert Dlg1.TextBox3 InsertPara If Dlg1.CheckBox1 = 1 Then Insert Dlg1.TextBox4 InsertPara End If OuttaHere: End Sub