Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-11-2022, 11:56 AM
Mr J Mr J is offline Looking for VBA code that can FIND and SELECT any text based on its properties Windows 10 Looking for VBA code that can FIND and SELECT any text based on its properties Office 2016
Novice
Looking for VBA code that can FIND and SELECT any text based on its properties
 
Join Date: Aug 2020
Location: California, US
Posts: 15
Mr J is on a distinguished road
Default Looking for VBA code that can FIND and SELECT any text based on its properties


Short Story
I am looking for VBA code to scan through a Word document and select any text that meets specific parameters like (Font = Arial, Text Size= 12, All Caps = True, Text = Bold… and so on.) and then highlight it.

Long story
I am looking for help finishing a macro I have been trying to create for a while now. The overall purpose is to extract the titles from manuals that I have and compare them to a list I have, to confirm they match. I have a portion of the codes I would like to combine, but I am missing the last piece and I cannot find it online or figure it out. I tried finding a way to run the “select text with similar formatting” but it would not record and I could not find anything online that would work.

The steps I have managed so far are as follows:
1. Merge all the manuals into one document.
2. Find and replace the ^p with a “space” (because I would like the title on 1 line)
3. This is the missing step - Select and highlight all the titles (just the titles and stores item No.) in the newly merged document.
4. Extract all the highlighted text onto a new Word document.
5. Add them to my excel list to compare them.

I have created or found everything I need except the 3rd step. Any help would be fantastic because I am not sure where else to look. I will include an attachment that is a template for the manuals I would be reviewing, so I would be combining multiple copies of the file and looking to extract just the titles. Also if someone knows of a better or more efficient method to get the same result please point me in the right direction. I know this is a long post but I wanted to make sure I was as clear as possible, thank you!
Attached Files
File Type: doc Sample Manual.doc (32.5 KB, 14 views)
Reply With Quote
 

Tags
macro find text, select text, vba

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro/VBA code to select ALL text in a textbox in microsoft excel and add a new row jyfuller Excel Programming 11 06-01-2015 08:49 PM
Macro to select an { includepicture } field code and format the picture behind text and 100% scale sanpedro Word VBA 3 03-30-2015 10:50 PM
Microsoft Word macro to find text, select all text between brackets, and delete helal1990 Word VBA 4 02-05-2015 03:52 PM
Looking for VBA code that can FIND and SELECT any text based on its properties VBA code for Microsoft Word macro — select text and insert footnote ndnd Word VBA 10 01-06-2015 01:47 PM
Looking for VBA code that can FIND and SELECT any text based on its properties How to find and select text in a document? mkhuebner Word VBA 8 02-04-2014 08:04 PM

Other Forums: Access Forums

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