Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-25-2014, 12:13 AM
macropod's Avatar
macropod macropod is offline Removing Duplicate Text in a Document Windows 7 64bit Removing Duplicate Text in a Document Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,363
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


Your .Text = expression isn't what I posted.

What separates the entries? The Find/Replace expression I posted assumes a single paragraph break.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 10-25-2014, 05:47 AM
rsrasc rsrasc is offline Removing Duplicate Text in a Document Windows 7 64bit Removing Duplicate Text in a Document Office 2010 64bit
Competent Performer
Removing Duplicate Text in a Document
 
Join Date: Mar 2014
Location: Germany
Posts: 148
rsrasc is on a distinguished road
Default

Hi Macropod,

First, I tried the Find/Replace option as you suggested, but did not work for me.


Second, tried to put it in a macro but still does not work for me.

Sorry, but I don't know how to get this to work.




PHP Code:
Sub MacroDeletingDoubleMCQ() 

lMacroDeletingDoubleMCQ 


    
Selection.Find.ClearFormatting 
    Selection
.Find.Replacement.ClearFormatting 
    With Selection
.Find 
        
.Text "(Question #[0-9]@ \(ACCCC*\)^13)\1" 
        
.Replacement.Text "\1" 
        
.Forward True 
        
.Wrap wdFindContinue 
        
.Format False 
        
.MatchCase False 
        
.MatchWholeWord False 
        
.MatchAllWordForms False 
        
.MatchSoundsLike False 
        
.MatchWildcards True 
    End With 
    Selection
.Find.Execute Replace:=wdReplaceAll 
End Sub 
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Locating and removing large, duplicate blocks of copy in word markaffleck Word 2 06-05-2014 10:12 PM
Removing blank pages at the end of a document Xanzia Word 3 06-01-2014 11:13 AM
Removing Duplicate Text in a Document Finding duplicate sentences in a document seascape Word VBA 1 02-18-2014 12:31 AM
Removing duplicate index entries Bengt Word 5 03-01-2013 02:01 AM
Saving Word document creates a duplicate transparent file bbailey Word 0 12-05-2009 10:54 PM

Other Forums: Access Forums

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