Question - Create a Microsoft Word macro using VBA (Visual Basic for Applications). Name the macro "highlight." The macro should highlight every third line of text in a document. (Imagine creating highlighting that will allow a user to quickly scan across the page - the highlighting acting as a ruler, if you will.)
Prompt the user for the number of lines to highlight and then use some shading (perhaps Yellow, or Gray 10%) to highlight every third line [lines 1, 4, 7, etc]
Prompt the user whether the highlighting should start from the beginning of the document (first line) or from the current cursor position.
Advanced students: Prompt the user for the number of lines to highlight and present the user with a choice of 3 different highlighting options (3 colors, perhaps). Also, ensure that there are not two non-highlighted lines at the end. A single non-highlighted line at the end is fine; however, two are not. Therefore, you may need to provide highlighting on the last line also.
If during your class introduction you mentioned having used VB, then you are considered an "advanced student" for this assignment :-) Consult chapter 13 in the Coding text for information on VBScript and chapter 4 for information on VB.Net. Recall the class discussion on control structures for some insight. Use the help feature of Microsoft Word along with any online resources to aid you in solving this problem. You will have to a problem-solver and locate resources to aid you in completing this assignment.
Hint: you can begin recording a macro and enter commands manually to see what type of VBA instructions will be produced. Be sure to add comments to the macro code. Save your macro with the name highlight within a document named CSC505unit3C.