View Single Post
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Word Auto Summary Option

That would be simple enough. Does the term 'Defect' begin a paragraph? Is
the defect contained in a single paragraph. Then the following macro will
list those paragraphs in a new document.
http://www.gmayor.com/installing_macro.htm

Sub ListDefects()
Dim oDoc As Document
Dim oList As Document
Dim oRng As Range
Set oDoc = ActiveDocument
Set oList = Documents.Add
oList.Range.Text = "List of Defects" & vbCr
Dim oPara As Paragraph
For Each oPara In oDoc.Range.Paragraphs
If InStr(1, oPara.Range, _
"Defect") = 1 Then
Set oRng = oPara.Range
oRng.Start = oRng.Words(2).Start
oList.Range.InsertAfter oRng.Text
End If
Next oPara
End Sub

If not how are the defects listed and what ends the description of the
defect.


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"stlhomeinspector" wrote in
message ...
I do home inspections and use Word for my reports. I would like to create
a
automatic summary page of all defects I list in my report instead of
having
to copy and paste them one by one. Is it possible to have word search for
a
specific "key word" then capture that canned statement and put it in a
seperate summary document automatically?

For example...

Defect -- The house needs ect ect

I want word to look for all canned statements that starts with the word
"Defect".