Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-08-2018, 01:34 AM
sarah2020 sarah2020 is offline Randomize Questions Order Windows 10 Randomize Questions Order Office 2016
Novice
Randomize Questions Order
 
Join Date: Mar 2018
Posts: 15
sarah2020 is on a distinguished road
Default Randomize Questions Order

Hello



I have a document having 100 questions in form of multiple-choice questions.

I want to generate 5 forms which have the same questions but I want to change the order of them [to prevent students from cheating]

I know I can do that manually but I find this cumbersome because I face this problem frequently.

I trust that I can find a simple solution from you here

Thanks
Reply With Quote
  #2  
Old 05-08-2018, 03:58 AM
Guessed's Avatar
Guessed Guessed is offline Randomize Questions Order Windows 10 Randomize Questions Order Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,975
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

If you want a simple solution then you will need to provide a sample doc.

If the questions are in a table the solution will be very different than if they are in paragraphs.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 05-08-2018, 04:08 AM
sarah2020 sarah2020 is offline Randomize Questions Order Windows 10 Randomize Questions Order Office 2016
Novice
Randomize Questions Order
 
Join Date: Mar 2018
Posts: 15
sarah2020 is on a distinguished road
Default

Quote:
Originally Posted by Guessed View Post
If you want a simple solution then you will need to provide a sample doc.

If the questions are in a table the solution will be very different than if they are in paragraphs.
Thanks; they're in paragraphs
Reply With Quote
  #4  
Old 05-08-2018, 04:48 AM
Guessed's Avatar
Guessed Guessed is offline Randomize Questions Order Windows 10 Randomize Questions Order Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,975
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

This would work adequately if you selected the paragraphs before running the macro.
Code:
Sub RandomiseParas()
  Dim aPar As Paragraph, i As Integer
  For Each aPar In Selection.Paragraphs
    i = Rnd() * 1000
    aPar.Range.InsertBefore Format(i, "000") & vbTab
  Next aPar
  Selection.Sort ExcludeHeader:=False, FieldNumber:="Paragraphs", _
      SortFieldType:=wdSortFieldAlphanumeric, SortOrder:=wdSortOrderAscending, _
      Separator:=wdSortSeparateByTabs
  WordBasic.ToolsBulletsNumbers Replace:=0, Type:=1, Remove:=1
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #5  
Old 05-08-2018, 05:02 AM
sarah2020 sarah2020 is offline Randomize Questions Order Windows 10 Randomize Questions Order Office 2016
Novice
Randomize Questions Order
 
Join Date: Mar 2018
Posts: 15
sarah2020 is on a distinguished road
Default

Quote:
Originally Posted by Guessed View Post
This would work adequately if you selected the paragraphs before running the macro.
Code:
Sub RandomiseParas()
  Dim aPar As Paragraph, i As Integer
  For Each aPar In Selection.Paragraphs
    i = Rnd() * 1000
    aPar.Range.InsertBefore Format(i, "000") & vbTab
  Next aPar
  Selection.Sort ExcludeHeader:=False, FieldNumber:="Paragraphs", _
      SortFieldType:=wdSortFieldAlphanumeric, SortOrder:=wdSortOrderAscending, _
      Separator:=wdSortSeparateByTabs
  WordBasic.ToolsBulletsNumbers Replace:=0, Type:=1, Remove:=1
End Sub
Thanks; no way to be done without Macro?
Reply With Quote
  #6  
Old 05-08-2018, 05:11 AM
Guessed's Avatar
Guessed Guessed is offline Randomize Questions Order Windows 10 Randomize Questions Order Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,975
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Yes, you can do it without macros.

You could put it in Excel and add a column with a =rand() formula, sort on that column then paste the resulting column of questions back into Word
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
PPT VBA Questions davidmorse PowerPoint 0 03-06-2018 09:35 PM
randomize numbers. help me defeat plagiarism! physicsphilosopher Word VBA 9 03-23-2017 10:08 PM
Randomize Questions Order Questions S_jt_C Word 1 12-05-2015 04:35 PM
Randomize Animations? idprincess03 PowerPoint 1 12-13-2012 06:57 AM
Few questions...needs some help! Wolf.Stalker Outlook 1 02-21-2012 09:15 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:50 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft