Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
msmouse msmouse is offline
external usenet poster
 
Posts: 2
Default Is it possible to randomize data in a list

In Word 2000, Os is Me
--
May the Lord bless you richly with blessings that keep you learning and
growing
  #2   Report Post  
Posted to microsoft.public.word.newusers
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Is it possible to randomize data in a list

Take a look at the following that was created for someone who wanted to
produce sets of test questions in a different random order for each student:

Dim i As Integer, j As Integer, k As Integer, Source As Document, Target As
Document, students As Integer

Dim Message, Title, question As Range

Message = "Enter number of students" ' Set prompt.

Title = "Randomizer" ' Set title.

' Display message, title

students = InputBox(Message, Title)



For k = 1 To students

Set Source = Documents.Open("E:\Worddocs\source1.doc")

Set Target = Documents.Add

For i = 100 To 0 Step -1

j = Int((i * Rnd) + 1)

Set question = Source.Paragraphs(j).Range

Target.Range.InsertAfter question

question.Delete

Next i

' Print and Close Document with random list of questions

Target.PrintOut

' Target.SaveAs ("E:\worddocs\student" & k & ".doc")

Target.Close SaveChanges:=wdDoNotSaveChanges

Source.Close SaveChanges:=wdDoNotSaveChanges

Next k


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"msmouse" wrote in message
news
In Word 2000, Os is Me
--
May the Lord bless you richly with blessings that keep you learning and
growing



  #3   Report Post  
Posted to microsoft.public.word.newusers
msmouse msmouse is offline
external usenet poster
 
Posts: 2
Default Is it possible to randomize data in a list

Thank you, I don't know if I understand your reply, but if I can't figure it
out, then I will ask about that. Thank you for your help
Dev
--
May the Lord bless you richly with blessings that keep you learning and
growing


"msmouse" wrote:

In Word 2000, Os is Me
--
May the Lord bless you richly with blessings that keep you learning and
growing

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
Mail merge data not showing on Mail Recipient List Connie G Mailmerge 6 October 26th 06 04:17 PM
Converting MSWorks mailing list to a Data Source for use in Word Lossie Loon Mailmerge 2 October 24th 06 06:32 PM
Word 2003 Mail Merge Problem when E-Mailing Data Source Karen Townsend Mailmerge 3 June 20th 06 08:21 AM
How do i add new address to existing data list louise Mailmerge 1 April 10th 06 12:31 PM
print mail merge data source i.e entire list? davidorlinda Mailmerge 2 December 1st 05 06:33 PM


All times are GMT +1. The time now is 02:04 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"