Reply
 
Thread Tools Display Modes
  #1   Report Post  
schwa schwa is offline
Junior Member
 
Posts: 1
Default Macro to edit test questions

Hi, I'm using a macro to edit a lot of test questions, I’m just showing two of them here as an example.
1- Paul found it much easier to use a pencil for taking notes
as he could .......... mistakes, which he made plenty of, very easily.
A) type B) erase C) deter
D) furnish E) release
2- You have to watch that market trader very ...........;
otherwise, he will sneakily throw a few rotten oranges in
amongst the good ones.
A) closely B) secretly C) violently
D) daringly E) placidly

Sub root()
Selection.Find.ClearFormatting
Selection.GoTo What:=wdGoToHeading, Which:=wdGoToFirst
With Selection.Find
.Text = "A)"
.Forward = True
'.Wrap = wdFindContinue
.Format = False
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Do While Selection.Find.Execute
If Selection.Find.Found = True Then
Selection.MoveUp Unit:=wdParagraph, Count:=3, Extend:=wdExtend
Selection.Font.Bold = wdToggle
Selection.MoveDown Unit:=wdParagraph, Count:=2
End If
Loop
End Sub

Now, with this macro, I can turn the font of the question into bold, but the problem is that the macro above can not apply to every question because the number of lines may be different in every question so the values in the micro above (Count:=3 and Count:=2) should be changed or is there any universal way for this?

ALSO;
I want that macro to turn the question into a SINGLE PARAGRAPH, for which I’m currently using a separate macro:

Sub testnew()
'
' testnew Makro
'
'
Selection.HomeKey Unit:=wdLine
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.HomeKey Unit:=wdLine
Selection.TypeBackspace
Selection.TypeText Text:=" "
End Sub

I want to merge the two macros, if possible.
Sorry for the long post, and thank you for your attention
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Questions to expect on Word assessment test Richard Champlin Microsoft Word Help 1 March 19th 08 04:17 PM
change test questions to reverse order Dave R. Microsoft Word Help 5 August 27th 06 09:11 AM
scramble the questions,on a test and create another version torrence Microsoft Word Help 1 March 7th 06 12:13 AM
Sequentially numbering multiple-choice test questions? tgocean Microsoft Word Help 4 September 20th 05 05:37 AM
Quick way to rearrange test questions in Word lkr6104r Page Layout 5 April 11th 05 12:29 PM


All times are GMT +1. The time now is 09:01 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"