#1
|
|||
|
|||
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. |
#2
|
||||
|
||||
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] |
#3
|
|||
|
|||
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. |
#4
|
||||
|
||||
Ever heard of Ctrl-A?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
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. |
#6
|
||||
|
||||
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] |
#7
|
|||
|
|||
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.
|
#8
|
||||
|
||||
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 |
#9
|
||||
|
||||
Clever. Not sure if it's any quicker than what I suggested, but clever.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#10
|
|||
|
|||
Quote:
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. |
#11
|
|||
|
|||
16 gb is plenty. Is your document on OneDrive?
|
#12
|
|||
|
|||
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 |
#13
|
||||
|
||||
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] |
#14
|
|||
|
|||
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.
|
#15
|
||||
|
||||
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] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Export properties of a given Style. | mc1903 | Word VBA | 2 | 01-17-2019 08:35 AM |
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 |