Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
What version of Word are you using? As of Word 2002 you can use
noncontiguous text selection. Then all you need to do in Find is use "Find All" and then copy/paste the found results as desired. Please post all follow-up questions to the newsgroup. Requests for assistance by email can not be acknowledged. ~~~~~~~~~~~~~~~ Beth Melton Microsoft Office MVP Co-author of Word 2007 Inside Out: http://www.microsoft.com/MSPress/boo...x#AboutTheBook Word FAQ: http://mvps.org/word TechTrax eZine: http://mousetrax.com/techtrax/ MVP FAQ site: http://mvps.org/ "David Newmarch" wrote in message ... 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. |
#3
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Many thanks Beth. That does exactly what I wanted. Now my only problem is
trying to figure out what I did wrong when I tried that out to begin with! "Beth Melton" wrote: What version of Word are you using? As of Word 2002 you can use noncontiguous text selection. Then all you need to do in Find is use "Find All" and then copy/paste the found results as desired. Please post all follow-up questions to the newsgroup. Requests for assistance by email can not be acknowledged. ~~~~~~~~~~~~~~~ Beth Melton Microsoft Office MVP Co-author of Word 2007 Inside Out: http://www.microsoft.com/MSPress/boo...x#AboutTheBook Word FAQ: http://mvps.org/word TechTrax eZine: http://mousetrax.com/techtrax/ MVP FAQ site: http://mvps.org/ "David Newmarch" wrote in message ... 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. |
#4
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Glad to hear the solution will work for you. :-)
For some reason, sometimes what it takes is confirmation that what you thought should work actually does work. ;-) Please post all follow-up questions to the newsgroup. Requests for assistance by email can not be acknowledged. ~~~~~~~~~~~~~~~ Beth Melton Microsoft Office MVP Co-author of Word 2007 Inside Out: http://www.microsoft.com/MSPress/boo...x#AboutTheBook Word FAQ: http://mvps.org/word TechTrax eZine: http://mousetrax.com/techtrax/ MVP FAQ site: http://mvps.org/ "David Newmarch" wrote in message ... Many thanks Beth. That does exactly what I wanted. Now my only problem is trying to figure out what I did wrong when I tried that out to begin with! "Beth Melton" wrote: What version of Word are you using? As of Word 2002 you can use noncontiguous text selection. Then all you need to do in Find is use "Find All" and then copy/paste the found results as desired. Please post all follow-up questions to the newsgroup. Requests for assistance by email can not be acknowledged. ~~~~~~~~~~~~~~~ Beth Melton Microsoft Office MVP Co-author of Word 2007 Inside Out: http://www.microsoft.com/MSPress/boo...x#AboutTheBook Word FAQ: http://mvps.org/word TechTrax eZine: http://mousetrax.com/techtrax/ MVP FAQ site: http://mvps.org/ "David Newmarch" wrote in message ... 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. |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
extract data from multiple Word forms into Excel | Microsoft Word Help | |||
extract data from multiple word forms into excel (revisited) | Microsoft Word Help | |||
Multiple selections in a form field drop-down list | Microsoft Word Help | |||
How can I allow multiple selections in a drop down box? | Microsoft Word Help | |||
multiple option button selections | Microsoft Word Help |