Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 11-06-2012, 06:45 AM
gmaxey gmaxey is offline Iterative / sequential find and replace Windows XP Iterative / sequential find and replace Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,601
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

This should work:

HTML Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oPar As Word.Paragraph
Dim oRng As Word.Range
  For Each oPar In ActiveDocument.Range.Paragraphs
    If Not oPar.Range.Words(1) Like vbCr Then
      If oPar.Range.Words(2) = vbTab Then
         Set oRng = oPar.Range.Words(1)
         ActiveDocument.Fields.Add oRng, wdFieldSequence, "Numbered", False
      End If
    End If
  Next oPar
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
 

Tags
find and replace



Similar Threads
Thread Thread Starter Forum Replies Last Post
Iterative / sequential find and 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
Iterative / sequential find and replace Is there a way to use "find/replace" to find italics words? slayda Word 3 09-14-2011 02:16 PM
Iterative / sequential find and replace Find and Replace kjxavier Word 6 08-19-2011 09:56 PM
Iterative / sequential find and replace Find and Replace kjxavier Word 1 08-12-2011 08:57 AM
Iterative / sequential find and replace Help with find and replace or query and replace shabbaranks Excel 4 03-19-2011 08:38 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:48 PM.


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