Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 05-29-2012, 04:07 AM
macropod's Avatar
macropod macropod is offline Insert text at the end of a sentence Find/Replace Windows 7 64bit Insert text at the end of a sentence Find/Replace Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,512
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Try the following macro:
Code:
Sub AddTags()
Dim Snt As Range
For Each Snt In ActiveDocument.Sentences
  If InStr(Snt.Text, "<start level = ""4""> ") = 1 Then
    Snt.InsertAfter "<end level = ""4""> "
  End If
Next
End Sub
To use it, see: http://www.gmayor.com/installing_macro.htm
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert text at the end of a sentence Find/Replace Macro to find text and replace with form field containing that text iiiiifffff Word VBA 16 06-04-2016 01:47 AM
Insert text at the end of a sentence Find/Replace Bad view when using Find and Find & Replace - Word places found string on top line paulkaye Word 4 12-06-2011 11:05 PM
Insert text at the end of a sentence Find/Replace Help with find and replace or query and replace shabbaranks Excel 4 03-19-2011 08:38 AM
Find and replace page numbers in body of text tollanarama Word 3 02-13-2011 06:00 AM
Find & Replace Insert Issue mipacker Word 0 02-18-2009 08:59 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:08 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft