User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » Word 2010 Macro Help Page [1]  
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

qntmfred
retired
40816 Posts
user info
edit post

couldn't you do this with a mail merge with an excel data source? i don't know much about macros, so this seems like a weird solution to me

10/18/2010 1:46:52 PM

Grandmaster
All American
10829 Posts
user info
edit post

You may have something there qntm...

10/18/2010 1:58:53 PM

 Message Boards » Tech Talk » Word 2010 Macro Help Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.39 - our disclaimer.