AJohnson
02-16-2022, 02:01 PM
I am working on converting paper quizzes into a format that can be uploaded to our LMS. I have worked out a VBA code that already corrects all the formatting, the only part that I cannot figure out is how to take the line of text that has the correct answer(s) and find the corresponding lines above it and add an asterisk to the beginning of that line, then remove the line with the correct answer.
Here is how the document currently formatted:
Category: Cognitive Level/Understand, Question Type/Multiple Choice 1. Question stem listed here for traditional 4 answer multiple choice question.
A. Choice 1
B. Choice 2
C. Choice 3
D. Choice 4
ANS: B
~Rationale:
Category: Cognitive Level/Apply, Question Type/Select All That Apply 2. Question stem for a question that has 4-6 answer choices and students select all that apply.
A. Choice 1
B. Choice 2
C. Choice 3
D. Choice 4
E. Choice 5
F. Choice 6
ANS: A, C, E
~Rationale:
And this is what I need it to look like when answers have been marked:
Category: Cognitive Level/Understand, Question Type/Multiple Choice 1. Question stem listed here for traditional 4 answer multiple choice question.
A. Choice 1
*B. Choice 2
C. Choice 3
D. Choice 4
~Rationale:
Category: Cognitive Level/Apply, Question Type/Select All That Apply 2. Question stem for a question that has 4-6 answer choices and students select all that apply.
*A. Choice 1
B. Choice 2
*C. Choice 3
D. Choice 4
*E. Choice 5
F. Choice 6
~Rationale:
Any help with how I can do this with VBA is greatly appreciated!
Here is how the document currently formatted:
Category: Cognitive Level/Understand, Question Type/Multiple Choice 1. Question stem listed here for traditional 4 answer multiple choice question.
A. Choice 1
B. Choice 2
C. Choice 3
D. Choice 4
ANS: B
~Rationale:
Category: Cognitive Level/Apply, Question Type/Select All That Apply 2. Question stem for a question that has 4-6 answer choices and students select all that apply.
A. Choice 1
B. Choice 2
C. Choice 3
D. Choice 4
E. Choice 5
F. Choice 6
ANS: A, C, E
~Rationale:
And this is what I need it to look like when answers have been marked:
Category: Cognitive Level/Understand, Question Type/Multiple Choice 1. Question stem listed here for traditional 4 answer multiple choice question.
A. Choice 1
*B. Choice 2
C. Choice 3
D. Choice 4
~Rationale:
Category: Cognitive Level/Apply, Question Type/Select All That Apply 2. Question stem for a question that has 4-6 answer choices and students select all that apply.
*A. Choice 1
B. Choice 2
*C. Choice 3
D. Choice 4
*E. Choice 5
F. Choice 6
~Rationale:
Any help with how I can do this with VBA is greatly appreciated!