Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 07-02-2021, 03:27 AM
Guessed's Avatar
Guessed Guessed is offline VBA to only remove word at beginning and not additional instances within the same paragraph Windows 10 VBA to only remove word at beginning and not additional instances within the same paragraph Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Shelley

I'm expecting you to come up with some of the logic since you have been given oodles of code and don't appear to be experimenting on your own. Because you have never supplied a sample with EVERY condition in it at once, nobody has coded a complete solution.

A single search and replace won't do the full job because of the variations so you need to break it into steps.

Try to think of some stepwise logic that allows the macro to work out the difference between the 'means' you don't want and the 'means' you do want. Perhaps search for bold content and stick a unique tag after it to use as a reference point eg '</Bold>'. Then search on either side of that tag to get rid of punctuation or spaces right beside it. Then search for '</Bold>means' and replace it with a tab.

If you use the same stepwise logic for your other problem (definition followed by a paragraph mark) you can work out a series of steps that works there too.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA to only remove word at beginning and not additional instances within the same paragraph Replace a character only if it is at the beginning of the paragraph. donpopo Word 2 11-11-2018 11:32 PM
VBA to only remove word at beginning and not additional instances within the same paragraph Word macro to insert text at the beginning of paragraph but skip tables ashalles135 Word VBA 5 09-26-2018 09:49 AM
VBA to only remove word at beginning and not additional instances within the same paragraph Space tab at the beginning of each paragraph in a chapter village Word 3 07-20-2018 01:48 AM
VBA to only remove word at beginning and not additional instances within the same paragraph word macro To insert text at the beginning and at end of paragraph ArieH Word VBA 20 09-10-2017 04:23 PM
VBA to only remove word at beginning and not additional instances within the same paragraph remove row from dataset for additional calculations canajun Excel 1 01-06-2015 06:38 AM

Other Forums: Access Forums

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