Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-22-2019, 12:44 AM
yacov yacov is offline export text by style Windows 10 export text by style Office 2016
Competent Performer
export text by style
 
Join Date: Oct 2019
Posts: 139
yacov is on a distinguished road
Default

Hi
I am working on a long document. And I marked an important new style text so I could locate it more easily, with most text in simple style. The special style text is scattered throughout the document. I would like to know if can only the special text be exported to another file in pdf or docx?

thanks

it's possible with selection by type and copy/paste.
Reply With Quote
  #2  
Old 12-22-2019, 03:27 AM
macropod's Avatar
macropod macropod is online now export text by style Windows 7 64bit export text by style 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

Three steps:
1. Format all content as hidden.
2. Use Find/Replace to unhide all content in your Style
3. Save the result as a plain text file.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 12-22-2019, 05:51 AM
yacov yacov is offline export text by style Windows 10 export text by style Office 2016
Competent Performer
export text by style
 
Join Date: Oct 2019
Posts: 139
yacov is on a distinguished road
Default

thanks for your answer.
it's a heavy operation to select all that text in order to hide it.
my file is more than 1000 pages. maybe i will split it.
Reply With Quote
  #4  
Old 12-22-2019, 06:12 AM
macropod's Avatar
macropod macropod is online now export text by style Windows 7 64bit export text by style 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

Quote:
Originally Posted by yacov View Post
it's a heavy operation to select all that text in order to hide it.
my file is more than 1000 pages. maybe i will split it.
Ever heard of Ctrl-A?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 12-22-2019, 06:24 AM
yacov yacov is offline export text by style Windows 10 export text by style Office 2016
Competent Performer
export text by style
 
Join Date: Oct 2019
Posts: 139
yacov is on a distinguished road
Default

yes. i try to select it with control+a also.
but the computer get very slow.
i have 450000 word in the document. and i have 5 files like that.
Reply With Quote
  #6  
Old 12-22-2019, 12:27 PM
macropod's Avatar
macropod macropod is online now export text by style Windows 7 64bit export text by style 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

There really is no faster way...

A macro could be used to automate the process, but even that wouldn't save much time.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 12-22-2019, 01:29 PM
Charles Kenyon Charles Kenyon is offline export text by style Windows 10 export text by style Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Often the cure for a very slow computer is to add RAM to it. If you can put more in, put in as much as the computer will hold.
Reply With Quote
  #8  
Old 12-22-2019, 05:40 PM
Guessed's Avatar
Guessed Guessed is offline export text by style Windows 10 export text by style Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
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

I would extract the content by building a Table of Contents for just that style. The TOC can then be copy/pasted into a different document. You can exclude the page numbers from the TOC by including the \n switch.

You could even do this with a TOC and an RD field in a second document if you didn't want to copy and paste the TOC as text into a different document.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #9  
Old 12-22-2019, 05:57 PM
macropod's Avatar
macropod macropod is online now export text by style Windows 7 64bit export text by style 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

Clever. Not sure if it's any quicker than what I suggested, but clever.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #10  
Old 12-22-2019, 07:13 PM
yacov yacov is offline export text by style Windows 10 export text by style Office 2016
Competent Performer
export text by style
 
Join Date: Oct 2019
Posts: 139
yacov is on a distinguished road
Default

Quote:
Originally Posted by Charles Kenyon View Post
Often the cure for a very slow computer is to add RAM to it. If you can put more in, put in as much as the computer will hold.
Hi Charles,
i have 16 gb Ram. I never see Word using half of that. Is there a way to get the software to use the most memory?
i have word 2016 64 bit.
Reply With Quote
  #11  
Old 12-22-2019, 08:08 PM
Charles Kenyon Charles Kenyon is offline export text by style Windows 10 export text by style Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

16 gb is plenty. Is your document on OneDrive?
Reply With Quote
  #12  
Old 12-22-2019, 08:17 PM
yacov yacov is offline export text by style Windows 10 export text by style Office 2016
Competent Performer
export text by style
 
Join Date: Oct 2019
Posts: 139
yacov is on a distinguished road
Default

No it's local.
i found that script:
How Can I Extract Word Paragraphs That Use a Specific Style? | Scripting Blog
how can i change the file name to the document that is open?


Set objWord = CreateObject(“Word.Application”)

objWord.Visible = True

Set objDoc = objWord.Documents.Open(“C:\Scripts\Test.doc”)

Set objSelection = objWord.Selection

Set colParagraphs = objDoc.Paragraphs


For Each objParagraph in colParagraphs

If objParagraph.Style <> “Heading 1” Then

objParagraph.Range.Select

objSelection.Cut

End If

Next


objDoc.SaveAs(“C:\Scripts\Headings.doc”)

objWord.Quit
Reply With Quote
  #13  
Old 12-22-2019, 09:24 PM
macropod's Avatar
macropod macropod is online now export text by style Windows 7 64bit export text by style 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

You macro will be much slower than the approaches Andrew and I suggested. Moreover, the macro will only work with paragraph Styles.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #14  
Old 12-22-2019, 11:39 PM
yacov yacov is offline export text by style Windows 10 export text by style Office 2016
Competent Performer
export text by style
 
Join Date: Oct 2019
Posts: 139
yacov is on a distinguished road
Default

The problem is that I can't select all the text to hide it. I can split the document, but already the document is split into 5 files. And in the future I will probably reach a document of more than 10000 pages.
Reply With Quote
  #15  
Old 12-22-2019, 11:42 PM
macropod's Avatar
macropod macropod is online now export text by style Windows 7 64bit export text by style 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

Quote:
Originally Posted by yacov View Post
The problem is that I can't select all the text to hide it
Ctrl-A will do that in an instant. Had you taken either of the approaches Andrew and I suggested, the task could have been finished as many as 20 hours ago...
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
export text by style Export properties of a given Style. mc1903 Word VBA 2 01-17-2019 08:35 AM
export text by style VBA Export Data as Text from Excel to Word lwbarnes Word VBA 3 06-09-2016 02:47 PM
Matching text style to drawing object style notarichman PowerPoint 0 03-07-2011 11:34 AM
Objective: Automatically export email text,attachment text to DB friendly format SilentLee Outlook 0 11-14-2010 02:45 PM
Need to delete style and style text mclan Word 0 08-04-2008 12:05 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:48 AM.


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