View Single Post
 
Old 12-03-2013, 10:08 AM
donaldadams1951 donaldadams1951 is offline Windows XP Office 2010 32bit
Advanced Beginner
 
Join Date: Dec 2013
Location: San Francisco Bay Area
Posts: 37
donaldadams1951 is on a distinguished road
Default

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.
Reply With Quote