Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-07-2014, 05:54 PM
macropod's Avatar
macropod macropod is offline Delete starting number *) and delete Unneeded data in series Windows 7 64bit Delete starting number *) and delete Unneeded data in series 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

Try:


Code:
Sub Demo()
Application.ScreenUpdating = False
With ActiveDocument.Range
  With .Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Format = False
    .Forward = True
    .Wrap = wdFindContinue
    .MatchWildcards = True
    .Text = "([0-9]@\)*^13)(*)(Answer:*^13)"
    .Replacement.Text = "\1\3\2"
    .Execute Replace:=wdReplaceAll
    .Text = "^13^13"
    .Replacement.Text = "^px^&"
    .Execute Replace:=wdReplaceAll
    .Text = "([0-9]@\)*Answer:*)([A-Z])*(\2\)*^13)*^13{2}"
    .Replacement.Text = "\1\3^p"
    .Execute Replace:=wdReplaceAll
  End With
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
delete number, find & replace, reorder



Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete starting number *) and delete Unneeded data in series Macro Needed to delete Unwanted paragraphs in series frustrated teacher Word VBA 1 05-02-2014 03:32 PM
Macro Needed to Delete Unneeded Answers in Multiple Choice Format Question frustrated teacher Word VBA 6 05-02-2014 03:37 AM
Delete starting number *) and delete Unneeded data in series Delete table if cell has data So New2 This Word VBA 1 05-06-2013 09:00 PM
Delete option greyed out when trying to delete row 1 tpcervelo Excel 2 11-15-2011 06:48 AM
delete email message via blackberry and have it delete on my pop3 and my outlook Iamthestorm Outlook 2 10-28-2010 12:21 AM

Other Forums: Access Forums

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