Sub MAIN FileOpen .Name = "c:/windows/desktop/index.txt" Begin Dialog UserDialog 320, 240, "Fix index.html" Text 10, 6, 111, 13, "Document title", .Text1 TextBox 10, 22, 290, 18, .document_title Text 10, 46, 71, 13, "Main text", .Text2 TextBox 10, 62, 290, 18, .text_1 OKButton 10, 171, 88, 21 CancelButton 114, 171, 88, 21 End Dialog Dim dlg As UserDialog x = Dialog(dlg, 1) If x = - 1 Then EditReplace .Find = "DOCUMENT_TITLE", .Replace = dlg.document_title, .MatchCase, .WholeWord, .ReplaceAll EditReplace .Find = "TEXT_1", .Replace = dlg.text_1, .MatchCase, .WholeWord, .ReplaceAll EndIf EditFind .Find = "PAGE_BODY", .WholeWord, .MatchCase ToolsMacro .Name = "AddLink", .Run FileSaveAs .Name = "c:\windows\desktop\index.html", .Format = 2 FileClose 2 End Sub