Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 03-14-2016, 04:13 PM
macropod's Avatar
macropod macropod is offline Fix for a replacement macro Windows 7 64bit Fix for a replacement macro Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

The problem is that you're working with paragraph breaks and inserting tabs after them, rather than working with paragraphs and inserting tabs before them. Try:
Code:
Sub Demo()
Application.ScreenUpdating = False
With ActiveDocument.Range
  With .Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = "[!^13]@^13"
    .Replacement.Text = "^t^&"
    .Forward = True
    .Wrap = wdFindContinue
    .Format = False
    .MatchWildcards = True
    .Execute Replace:=wdReplaceAll
  End With
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Tags
recorded macro failure, replace



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell replacement? lily Excel 1 06-07-2015 07:20 PM
Fix for a replacement macro Word Replacement Option mattyra Word 7 02-11-2015 11:13 PM
Fix for a replacement macro Automatic Words replacement psychologist Word VBA 3 11-22-2014 11:40 AM
Replacement lostsoul62 Excel 0 04-14-2012 10:07 AM
Replacement Software hirize Office 0 08-28-2008 02:33 PM

Other Forums: Access Forums

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