Grandmaster All American 10829 Posts user info edit post |
I'm trying to write a macro that will take a page of questions and copy each one to a flash card template.
Question 1 5 out of 5 points Question one is written here? Selected Answer: This is the answer to Question 1. Question 2 0 out of 5 points Question two is written here? Selected Answer: This is the answer to Question 2.
-- This is what I've found so far as base for tweaking, but it doesn't even remotely work as expected.
Sub CopyParas Selection.Find.ClearFormatting With Selection.Find .Text = "Question" .Forward = True .Wrap = wdFindStop .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Do While Selection.Find.Execute Selection.StartOf Unit:=wdParagraph Selection.MoveEnd Unit:=wdParagraph sBigString = sBigString + Selection.Text Selection.MoveStart Unit:=wdParagraph Loop Documents.Add DocumentType:=wdNewBlankDocument Selection.InsertAfter (sBigString) End Sub 10/18/2010 11:53:45 AM |