Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
I have a really long document and I need to find a way to
automatically pull a list of capitalized words and phrases (e.g., Idaho, Supreme Court, etc.) into a list of such words and phrases. Does anyone know how I can do that? Is there a tool or something? Thanks! |
#2
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Kavi,
Maybe someone will come along with a solution, but that is a pretty tall order. Consider your example: I think that you will agree that Supreme Court is not a word. It is two words. A list using the text in your post would return I I Idaho Supreme Court Does I Is Thanks You can confirm that by pasting your message in a new Word document and running the macro shown below: Sub Scratchmacro() Dim myArray() As String Dim oWord As Range Dim i As Long Dim lngCount As Long lngCount = ActiveDocument.Words.Count ReDim myArray(lngCount) For Each oWord In ActiveDocument.Words If oWord.Characters.First Like "[A-Z]" Then myArray(i) = oWord i = i + 1 End If Next ReDim Preserve myArray(i) i = 0 For i = 0 To UBound(myArray) MsgBox myArray(i) Next i End Sub -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. Kavi wrote: I have a really long document and I need to find a way to automatically pull a list of capitalized words and phrases (e.g., Idaho, Supreme Court, etc.) into a list of such words and phrases. Does anyone know how I can do that? Is there a tool or something? Thanks! |
#3
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Hi Submariner,
I think that you will agree that Supreme Court is not a word. It is two words. it isn't that far from Word programming to linguistics. What I was taught is, that if no other word fits between two words, who may be found on their own as well, such as "killer whale", this is to be regarded as one word. Same with "singer songwriter", though there is "singer composer songwriter", which is then regarded as consisting of "singer composer" and "songwriter". Or "killer hunter" and "killer whale hunter". All in all, just another helpless attempt to find rules for natural language, which simply doesn't obey to rules. As soon as there seems to be a rule, someone breaks it in order to get more attention, as long as there is sufficient redundancy for being understood. Have a nice day. -- Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Win XP, Office 2003 "red.sys" & Chr$(64) & "t-online.de" |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
take yet another lesson from wordperfect "reveal codes" | Microsoft Word Help | |||
glossary macro in Word? | Microsoft Word Help | |||
Highlighting specific words | Microsoft Word Help | |||
Word's word count feature should be able to count sentences also | Microsoft Word Help | |||
Search Word files with a list of words or phrases | Microsoft Word Help |