Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 12-12-2019, 01:27 PM
qubie qubie is offline I am trying to delete text of any format between two bold, recurring keywords or symbols Windows 7 64bit I am trying to delete text of any format between two bold, recurring keywords or symbols Office 2007
Novice
I am trying to delete text of any format between two bold, recurring keywords or symbols
 
Join Date: Aug 2016
Posts: 24
qubie is on a distinguished road
Default

Greetings,

I have been working with the above code (a) to understand it and (b) to coax it or something like it to work with an additional wrinkle. I have been researching and working on the latter for a couple of weeks. No success.

Records I am working with look something like this very random example:

* * * *

§ 1. By unanimous-consent, agreement was reached on providing megaphones for antelopes.
Research Refs Bruce Wayne, of Gotham, was nominated to be Ambassador to the Russian Federation, and That Guy's Cats, of Texas, to be Commissioner of Food and Drugs, Department of Health and Human Services, and Aurelia Skipwith, of Indiana, to be Director of the United States Fish and Wildlife Service . . . .

§ 2. Committee on Armed Services: . . . both of the Department of Defense.

* * * *

I am trying to make the code search for multiple, optional "key word" end points for oRngE.

In the above example, for instance, I intend for the range selected for deletion to end with That Guy's Cats, rather than at the next § symbol.

For each occurrence of Research Refs in my records, an instance of That Guy's Cats may appear thereafter and before the next §; sometimes, however, the phrase That Guy's Cats does not show up between the two.

It appears to do no good for me to define two ranges in separate "With" structures, and search for the respective "key words" in successive order. That will delete more text than I intend to remove.

I have wrestled with Do ... While, and I tried nested If ... Then ... Else structures.

My coding ideas look (and also work) like something left behind by That Guy's Cats.


The snag that I cannot unravel is how to look for That Guy's Cats within the already-defined range that starts with Research Refs and ends with §.

With thanks and regards,

Q.
Reply With Quote
 

Tags
word vba macro



Similar Threads
Thread Thread Starter Forum Replies Last Post
I am trying to delete text of any format between two bold, recurring keywords or symbols bold (or unbold) section of text instead of bold toggling Burt Word 6 04-06-2019 09:09 AM
I am trying to delete text of any format between two bold, recurring keywords or symbols Macro to delete text from cells with specific format Soenke Word VBA 4 09-01-2016 08:55 AM
Bold each line of text that starts with a recurring symbol qubie Word 6 08-26-2016 07:10 AM
I am trying to delete text of any format between two bold, recurring keywords or symbols Text in #1 is made bold, rest of the document is edited, text in #1 is now not bold footer-assistance Word 1 06-29-2015 03:49 AM
Format Bold in one line makes all lines bold Nitte Word 2 02-07-2013 12:34 AM

Other Forums: Access Forums

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