Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 01-06-2014, 02:01 PM
Sandy27 Sandy27 is offline Loop through Word doc to find and reformat text Windows 7 64bit Loop through Word doc to find and reformat text Office 2010 64bit
Novice
Loop through Word doc to find and reformat text
 
Join Date: Nov 2013
Posts: 8
Sandy27 is on a distinguished road
Default

Thank you both very much for your help. Neither solution seemed to work initially and I have been experimenting with variations on the code. I also realised that I should be searching either for "cc" + Tab or, possibly, CR + "cc" + Tab. The nearest I have got is with this:
Code:
With .Documents("Temporary.docx").Range
  Do
    With .Find
      .ClearFormatting
      .Replacement.ClearFormatting
      .Text = "cc^9"
      .Replacement.Text = ""
      .Forward = True
      .Wrap = wdFindStop
      .Format = False
      .MatchWildcards = True
      .Execute
    End With
    .Font.Size = 9
    .Collapse 0 '0= wdCollapseEnd
    .Find.Execute
  Loop While .Find.Found
End With
which, bizarrely, changes every other "cc" + Tab to font size 9, but not the adjacent name and address (which is in a single line), but doesn't affect the rest of the letters, which remain at font size 12. I'd be grateful for any comments.

Last edited by macropod; 01-06-2014 at 02:23 PM. Reason: Added code tags & formatting
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Loop through Word doc to find and reformat text Loop action in Word until not found kilburfi Word VBA 2 07-12-2013 01:26 AM
Loop through Word doc to find and reformat text Reformat line lengths joe925 Word 1 03-18-2013 05:06 PM
reformat file renato Word 1 06-13-2012 06:32 AM
Loop through Word doc to find and reformat text Macro to loop in Word Yamaha Rider Word VBA 2 02-07-2012 05:33 PM
Loop through Word doc to find and reformat text 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 07:16 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