Microsoft Small Basic

Program Listing: DZS841-0
'order to teach variation two

words["currentAdverb"] = MessageBox.AskForInput("Adverb?")
words["currentEdVerb"] = MessageBox.AskForInput("-Ed Verb?")
words["currentBodyPart"] = MessageBox.AskForInput("Body Part")
currentStory = Parser.Merge("Today I woke {currentAdverb} . Then I {currentEdVerb} my {currentBodyPart} ",words)

'Open Word and copy the story text into Word. - # 2.0
' The following line could be harmful and has been automatically commented.
' 'Save as 'C:\MyTemplate\MyTemplateFile.rtf' (make a folder) - # 2.1
'Replace the regular merge with mergeRTFFile using the path to the file and the words - # 2.2
'Format in the template file, i.e. change fonts, colors, insert pictures and re-run - # 3.0

MessageBox.ShowMessage(currentStory)
'Replace the message box with the Viewer display RTF file operation, show the current story -- # 1.0