Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-18-2016, 07:59 PM
macropod's Avatar
macropod macropod is offline How do I Remove A Specific Amount of Characters from Lines in a Document? Windows 7 64bit How do I Remove A Specific Amount of Characters from Lines in a Document? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,527
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

But, as my reply showed, you don't need a macro...



Without seeing your recorded macro, I can confidently say it wouldn't be as efficient as:
Code:
Sub Demo()
Application.ScreenUpdating = False
With ActiveDocument.Range
  With .Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = "^#^#^#^#^w-^w"
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindContinue
    .Format = False
    .MatchWildcards = False
    .Execute Replace:=wdReplaceAll
  End With
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I Remove A Specific Amount of Characters from Lines in a Document? Amount of specific word Stimo Word 1 09-17-2015 08:15 PM
hard lines across document - can't remove joanieS Word 3 07-30-2013 11:29 AM
How to remove these unknown characters appearing rajpes Word 1 03-02-2012 03:24 AM
Outlook 2007 - Notifications if emails are unread after a specific amount of time? Robb Outlook 0 12-10-2010 11:18 AM
Force Kiosk published PPT to return to a specific slide after x amount of minutes jasoomian PowerPoint 1 07-31-2010 03:09 AM

Other Forums: Access Forums

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