Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-22-2023, 11:12 AM
RobiNew RobiNew is offline Deleting specific strings of characters in specific positions Windows 10 Deleting specific strings of characters in specific positions Office 2016
Competent Performer
Deleting specific strings of characters in specific positions
 
Join Date: Sep 2023
Posts: 208
RobiNew is on a distinguished road
Default


Many thanks,Gmaxey, for the code and explanations! And thanks a lot, Vivka, for the concise alternative to my code!
Reply With Quote
  #2  
Old 11-22-2023, 12:02 PM
vivka vivka is offline Deleting specific strings of characters in specific positions Windows 7 64bit Deleting specific strings of characters in specific positions Office 2016
Expert
 
Join Date: Jul 2023
Posts: 302
vivka is on a distinguished road
Default

You are welcome!
Reply With Quote
  #3  
Old 11-23-2023, 03:14 AM
RobiNew RobiNew is offline Deleting specific strings of characters in specific positions Windows 10 Deleting specific strings of characters in specific positions Office 2016
Competent Performer
Deleting specific strings of characters in specific positions
 
Join Date: Sep 2023
Posts: 208
RobiNew is on a distinguished road
Default

Hi, Gmaxey! I was trying to use part of your code, but I failed somehow. I cannot force it to insert the new line. Thanks!
Code:
Set oRng = ActiveDocument.Range
    With oRng.Find
        .Text = " (about"
        .Replacement.Text = ""
If .Execute Then MsgBox "Found"
If .Execute Then oRng.InsertBefore "^l"
    End With
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting specific strings of characters in specific positions Word macro for deleting a line that starts with a specific character + deleting the line before eduardb Word 1 08-10-2022 03:17 AM
Search Word for specific strings and replace with hyperlinks from a list jlive24 Word VBA 2 06-26-2022 08:14 PM
Extracting Specific Text Strings PWH68 Word VBA 6 10-08-2019 02:07 AM
Deleting specific strings of characters in specific positions Deleting Characters in a specific location in Word 2010 ppayaw Word VBA 8 12-13-2016 08:11 AM
Deleting specific strings of characters in specific positions update style of all strings available between two specific strings vikrantkale Word 1 03-28-2011 06:13 PM

Other Forums: Access Forums

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