I have 56 documents each of which contains between 5 and 12 "activities" for a grade and unit. I need to split these out into new individual files/documents by lesson. Some lessons contain 2 activities and the remainder have only one activity.
Within the document each activity is formatted in the following manner:
----------------------------------------
NL_G5_LC_00202_LessonObjectTitle
Grade 5, Unit 3, Lesson 1
Activity Title
Inquiry Flipchart p. 12
Directed Inquiry
<snip -- removed 2-3 pp of activity text>
My Notes
<page break>
------------------------------------------
I looked at Tinbender's solution for Michelle_S (http://www.vbaexpress.com/forum/showthread.php?t=35900&highlight=split+document), however, I have the same text denoting each break ("My Notes" or the <page break>) instead of separate codes.
Some other requirements. I need to use the first line of text as the new filename; to that I need to append the grade, unit, and lesson numbers from the second line in the form "G5 U3 L1", so the filename reads: "NL_G5_LC_00202_LessonObjectTitle G5 U3 L1". Finally, the first line needs to be deleted.
When the lesson object code has a "C" in the 8th position (as above), the inquiry has two activities. When that code is an "I" there is only one activity.
Is it easier for the VBA to test the code and if a "C" is detected then find the 2nd instance of the "end of activity" to set the range? Or, is there a better way to handle that?
Let me know if you need more information.
Thanks in advance!