![]() |
|
#6
|
|||
|
|||
|
Thanks for the input...
This is what I did to remove the sections and text I inserted into the document. Code:
strSearchString = "Inst#: " & ReportInstance
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = strSearchString
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchWildcards = True
.Execute
' what section am I in?
If .Found = True Then
intSectionCount = ActiveDocument.Range(0, Selection.Range.End).Sections.Count
ActiveDocument.Sections(intSectionCount).Range.Delete
End If
End With
Last edited by donaldadams1951; 12-03-2013 at 11:08 PM. |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Deleting section break and retaining section properties
|
New Daddy | Word | 6 | 02-03-2014 07:09 PM |
Section Break (Next Page) replaces Section Break (Continuous) when deleted
|
Carlabasson | Word | 2 | 03-25-2013 10:13 PM |
| Footnotes in one column section forcing two column section start from a new page... | thorin | Word | 1 | 12-19-2012 01:22 PM |
Can't Delete Section Breaks with ^b
|
cheech1981 | Word | 8 | 07-11-2012 11:48 AM |
Copy/Paste/Delete Table & Section etc.
|
flds | Word VBA | 40 | 07-16-2011 07:34 AM |