Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-08-2014, 09:53 AM
JustAboutNoon JustAboutNoon is offline Deleting all text except text of a certain font size Windows 8 Deleting all text except text of a certain font size Office 2013
Novice
Deleting all text except text of a certain font size
 
Join Date: Oct 2014
Posts: 4
JustAboutNoon is on a distinguished road
Default Deleting all text except text of a certain font size

Background/Context:


For work, I frequently need to read long PDF's. I don't need to read them for perfect comprehension and I am capable of listening to content at a much faster speed than I can read it myself. I have a text to speech program I am happy enough with (Text Aloud). The problem is that the PDF's are heavilly footnoted, and I do not want to include the footnotes in the audio. The solution I have found is to convert the PDF to word. The word versions include the footnote text as regular body text (i.e. not in the footer), but put them in smaller font than the body text. The exact font size varies (even within the same document), do to imperfect OCR comprehension.
Question:
I understand how to use wildcards ^? and formatting rules to replace all text of a certain format with nothing and thereby delete it. How can I use VBA or some other feature, to remove ALL text that is NOT of a certain formating trait, within manually running the replace function many times?

Last edited by JustAboutNoon; 10-08-2014 at 10:03 AM. Reason: formatting
Reply With Quote
  #2  
Old 10-08-2014, 09:47 PM
gmayor's Avatar
gmayor gmayor is offline Deleting all text except text of a certain font size Windows 7 64bit Deleting all text except text of a certain font size Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,106
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Can you post a sample document? You can attach files to the forum if you click Go Advanced.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 10-09-2014, 02:37 AM
macropod's Avatar
macropod macropod is offline Deleting all text except text of a certain font size Windows 7 64bit Deleting all text except text of a certain font size Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

A fairly simple non-vba way to extract all text of a given attribute is to
• mark all the text as hidden
• use Find/Replace to find all text in your attribute and format as unhidden
• copy the document, then use Paste Special>Unformatted text. This will delete all the hidden text. What remains is the text in your attribute.

A fairly simple non-vba way to extract all text NOT of a given attribute is to use Find/Replace to find all text in your attribute and delete it. What remains is the content in not that attribute .

In each case, you'd probably want to save the results as a new file...
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #4  
Old 10-09-2014, 10:21 AM
JustAboutNoon JustAboutNoon is offline Deleting all text except text of a certain font size Windows 8 Deleting all text except text of a certain font size Office 2013
Novice
Deleting all text except text of a certain font size
 
Join Date: Oct 2014
Posts: 4
JustAboutNoon is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
A fairly simple non-vba way to extract all text of a given attribute is to
• mark all the text as hidden
• use Find/Replace to find all text in your attribute and format as unhidden
• copy the document, then use Paste Special>Unformatted text. This will delete all the hidden text. What remains is the text in your attribute.

A fairly simple non-vba way to extract all text NOT of a given attribute is to use Find/Replace to find all text in your attribute and delete it. What remains is the content in not that attribute .

In each case, you'd probably want to save the results as a new file...
That solves my problem beautifully. And makes me feel stupid in the best way. Very nice solution thank you!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting all text except text of a certain font size Font size of track changes balloon text Oryctolagus Word 1 11-13-2013 09:27 AM
making text (size/font) non editable in CONTROLS box....possible? bjsa06 Word 2 09-22-2013 09:58 PM
Deleting text of all one style mlp170738 Word 2 09-20-2012 06:41 AM
Deleting all text except text of a certain font size Deleting and adding text johnbiggsy Word 1 02-09-2010 08:45 PM
Deleting text problem XswordcraftX Word 2 11-17-2008 03:12 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:19 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft