Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-07-2018, 07:20 PM
Helend269 Helend269 is offline Delete certain characters from a line Windows 7 32bit Delete certain characters from a line Office 2003
Novice
Delete certain characters from a line
 
Join Date: Aug 2017
Posts: 15
Helend269 is on a distinguished road
Default Delete certain characters from a line

I have a situation where I need to go through a document, find a certain word and when that word has been found go down one line and if that line contains either opening or closing parenthesis then delete those two characters.



So:

Word
(sample text)

becomes

Word
sample text

All I have so far is:

Application.ScreenUpdating = False
Selection.HomeKey Unit:=wdStory
With Selection.Find
.ClearFormatting
.Wrap = wdFindStop
.Text = "WORD"
Do While .Execute
Selection.MoveDown Unit:=wdLine, Count:=1
'delete any instances of ( and ) from that line
Loop
End With
Application.ScreenUpdating = True

How can I do this, please? Many thanks.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete certain characters from a line Word 2010 characters per line glitch VelmaD Word 1 03-18-2014 05:41 PM
Delete certain characters from a line How do I delete strange characters from a document. Stokkers Word 1 06-12-2013 04:21 AM
Delete certain characters from a line Word VBA: Cannot Edit Range (Delete characters except the first in a table cell) tinfanide Word VBA 3 04-27-2012 09:48 AM
Delete certain characters from a line getting additional characters in email subject line namishtiwari Outlook 1 04-21-2009 11:21 PM
Delete certain characters from a line Help please: Keeping spaced characters on one line EtienneOBrien Word 3 12-24-2008 07:05 AM

Other Forums: Access Forums

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