D
David Newmarch
I want to be able to extract a whole lot of highlighted words and phrases
from a long Word document and copy them as a list to a new document.
One solution seems to be to use Spike, and I've recorded the following macro
(which I've called "multispike") to copy each highlighted word/phrase to
Spike. Where I need help, please, is with getting this macro to loop so that
it will run through the whole document.
Sub multispike()
'
' multispike Macro
' Macro recorded 23/04/2007 by dn
'
Selection.Find.ClearFormatting
Selection.Find.Highlight = True
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
NormalTemplate.AutoTextEntries.AppendToSpike Range:=Selection.Range
End Sub
And I'm also unsure how many selections Spike can handle. Is it feasible to
even attempt this method with a really long document (more than 200 pages,
with several hundred highlighted bits of text that I'm trying to extract)?
The document (a book manuscript) consists of about a dozen chapters and I can
always repeat the operation one chapter at a time, but it would be more
convenient to do the whole job at once.
And maybe there's a better way to approach the whole task. Any suggestions
will be most gratefully received.
from a long Word document and copy them as a list to a new document.
One solution seems to be to use Spike, and I've recorded the following macro
(which I've called "multispike") to copy each highlighted word/phrase to
Spike. Where I need help, please, is with getting this macro to loop so that
it will run through the whole document.
Sub multispike()
'
' multispike Macro
' Macro recorded 23/04/2007 by dn
'
Selection.Find.ClearFormatting
Selection.Find.Highlight = True
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
NormalTemplate.AutoTextEntries.AppendToSpike Range:=Selection.Range
End Sub
And I'm also unsure how many selections Spike can handle. Is it feasible to
even attempt this method with a really long document (more than 200 pages,
with several hundred highlighted bits of text that I'm trying to extract)?
The document (a book manuscript) consists of about a dozen chapters and I can
always repeat the operation one chapter at a time, but it would be more
convenient to do the whole job at once.
And maybe there's a better way to approach the whole task. Any suggestions
will be most gratefully received.