Prev: Document View
Next: Wikipedia-like text
From: stlhomeinspector on 16 May 2010 06:22 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".
From: Graham Mayor on 16 May 2010 06:59 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" <stlhomeinspector(a)discussions.microsoft.com> wrote in message news:B11EDCE8-D10D-4692-8E2C-0F55BA5A7B2A(a)microsoft.com... >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".
|
Pages: 1 Prev: Document View Next: Wikipedia-like text |