#1
|
|||
|
|||
I need help please!!!! Please
Hello forum! After probably 10 hours searching on google and youtube for help i found this forum.
I'm a teacher and i have a presentation in 2 days. I have this issue that i cant solve. Basically i'm trying to separate the school students 3 in 3. I have a list of 4000 students and i want to separate the students 3 in 3 so i can print like that. The list is like this. Example: a s f f h d s f d f t f s f g d f g f etc............. i want to separate automatically in WORD 2016 to 3 in 3. To look like this : d i f y g e y j v u f n etc.... I know this is probably the most stupid question someone done here and i'm sorry for that. I'm not a tech expert. I'm 56 years old. Thank you for your help and have a nice day! |
#2
|
||||
|
||||
Assuming that the letters represent names, and that each is in a separate paragraph, and that the second list (which bears no relationship to the first) is merely an example of what you wish to achieve then the following macro should work
Code:
Sub SplitList() Dim oPara As Paragraph Dim i As Long Dim j As Long For Each oPara In ActiveDocument.Paragraphs If Len(oPara.Range) = 1 Then oPara.Range.Delete Next oPara j = ActiveDocument.Paragraphs.Count Mod 3 For i = ActiveDocument.Paragraphs.Count - j To 1 Step -3 ActiveDocument.Paragraphs(i).Range.InsertParagraphAfter Next i End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
Thread Tools | |
Display Modes | |
|