Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 09-17-2014, 12:17 PM
gmaxey gmaxey is offline search for string, wherever found, at end of line, insert 8 <cr>s Windows 7 32bit search for string, wherever found, at end of line, insert 8 <cr>s Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oPar As Paragraph
  For Each oPar In ActiveDocument.Paragraphs
    If InStr(oPar.Range.Text, "KKJJ ABC") > 0 Then oPar.Range.InsertAfter String(8, vbCr)
  Next oPar
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
search for string, wherever found, at end of line, insert 8 <cr>s Search first section for specific string... donaldadams1951 Word VBA 4 03-14-2014 11:24 AM
search for string, wherever found, at end of line, insert 8 <cr>s Way to search for a string in text file, pull out everything until another string? omahadivision Excel Programming 12 11-23-2013 12:10 PM
search for string, wherever found, at end of line, insert 8 <cr>s Macro to create new word doc and save the file using String found in the document VBNation Word VBA 2 02-08-2013 07:14 AM
Excel Fomula to search for a string and display value from different column zeeshanbutt Excel 1 07-29-2012 12:48 AM
search for string, wherever found, at end of line, insert 8 <cr>s Bad view when using Find and Find & Replace - Word places found string on top line paulkaye Word 4 12-06-2011 11:05 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:44 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