Microsoft Office Forums Copy text to new document based on paragraph numbering

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-18-2016, 01:03 AM
mike.mm mike.mm is offline Copy text to new document based on paragraph numbering Windows 7 32bit Copy text to new document based on paragraph numbering Office 2013
Novice
Copy text to new document based on paragraph numbering
 
Join Date: Nov 2016
Posts: 5
mike.mm is on a distinguished road
Default Copy text to new document based on paragraph numbering

Hi All,



I am new so apologies for any issues caused by my lack of knowledge..

What I am looking for is a macro which will get all data from contents (OR paragraphs/ numbering on the own from the document) and will give you a table with this contents for example
1 Home,
1.1 going home,
1.2 how to drive home,
1.3 at home,
2 weather,
3 transport,
4.0 Tea,
4.1 mouse,
4.2 phone....

And I will select what I want to copy over to new document. For example I will select 1.2 how to drive home, 2 weather AND 4.2 phone...

based on my selection, which may change each time it will copy what ever content is in actual paragraph
so for 1.2 how to drive home, it will select the whole text and will finish before the 1.3,
and again because my selection was 2 weather it will select the whole paragraph and it will finish before 3 transport.

Basically give me a table with all paragraphs, I will select a few of them, the selected ones copy over to new document with all text under the paragraph up to the next one.

Is it possible? or am I coming form different world ?


In advance, Thank you for all your time...
Reply With Quote
  #2  
Old 11-22-2016, 04:46 AM
mike.mm mike.mm is offline Copy text to new document based on paragraph numbering Windows 7 32bit Copy text to new document based on paragraph numbering Office 2013
Novice
Copy text to new document based on paragraph numbering
 
Join Date: Nov 2016
Posts: 5
mike.mm is on a distinguished road
Default

OK, I can see that there are no reply's so what if the requirement will stay same apart of the table I have mentioned before. So instead of having table the selection will be made in VBA prior starting the macro... ( So everything will be set behind in code) Hope it make sense...
Reply With Quote
  #3  
Old 11-22-2016, 05:02 AM
Guessed's Avatar
Guessed Guessed is online now Copy text to new document based on paragraph numbering Windows 10 Copy text to new document based on paragraph numbering Office 2013
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 1,169
Guessed has a spectacular aura aboutGuessed has a spectacular aura aboutGuessed has a spectacular aura about
Default

You are asking for a macro that knows what you are thinking and can anticipate which paragraphs you want to copy. I don't know how to code that and I'm pretty sure the only person who could is you.

Try asking for something that a computer can identify. Like choosing paragraphs that can be identified by some attribute eg copy all Heading 2 and 3 paragraphs to a new document. Then you might have a chance of someone being able to create a macro to do that.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #4  
Old 11-22-2016, 05:07 AM
mike.mm mike.mm is offline Copy text to new document based on paragraph numbering Windows 7 32bit Copy text to new document based on paragraph numbering Office 2013
Novice
Copy text to new document based on paragraph numbering
 
Join Date: Nov 2016
Posts: 5
mike.mm is on a distinguished road
Default

Thanks for commenting.

"And I will select what I want to copy over to new document. For example I will select 1.2 how to drive home, 2 weather AND 4.2 phone... "

As mentioned in my reply, this is what will be in VBA. This the selection.

So firstly I was asking for getting a table of all paragraphs and I will chose the one I want, but because there were no reply's I am asking not asking for pop up table anymore as it may be added to macro and if changes are needed it will be changed in vba...
Reply With Quote
  #5  
Old 11-22-2016, 05:10 AM
Guessed's Avatar
Guessed Guessed is online now Copy text to new document based on paragraph numbering Windows 10 Copy text to new document based on paragraph numbering Office 2013
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 1,169
Guessed has a spectacular aura aboutGuessed has a spectacular aura aboutGuessed has a spectacular aura about
Default

So are you saying you want a macro to copy the current selection and paste it into a new document? And that selection may be discontinuous?

When you say you want a table of all paragraphs - is that somehow different to the whole document? If so, in what way?
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #6  
Old 11-22-2016, 05:57 AM
mike.mm mike.mm is offline Copy text to new document based on paragraph numbering Windows 7 32bit Copy text to new document based on paragraph numbering Office 2013
Novice
Copy text to new document based on paragraph numbering
 
Join Date: Nov 2016
Posts: 5
mike.mm is on a distinguished road
Default

1 Home,
1.1 going home,
1.2 how to drive home,
1.3 at home,
2 weather,
3 transport,
4.0 Tea,
4.1 mouse,
4.2 phone....


1 Home,
some random text is here

1.1 going home,
some random text is here

1.2 how to drive home,
some random text is here

1.3 at home,
some random text is here

2 weather,
some random text is here

3 transport,
some random text is here

4.0 Tea,
some random text is here

4.1 mouse,
some random text is here

4.2 phone....
some random text is here



The Red and Blue is the whole document, in red is the table of contents and in blue is the actual text with all paragraphs which creates the red table of contents.

What I am asking for is show me the table in Red when VBA is launched and ask me what do I want , I will click on 3 transport and 4.2 phone and run .... it will come back with the text: - and this is what i wanted as first...

3 transport,
some random text is here

4.2 phone....
some random text is here


Later I have changed my requirements to not to give me the table of contents (red one) to choose what to get but have it fixed in VBA ... so the code will actually include 3 transport and 4.2 phone and once I will run the macro it will go straight to results :

3 transport,
some random text is here

4.2 phone....
some random text is here



hmm ? Thanks again for looking into this !
Much appreciated
Reply With Quote
  #7  
Old 11-22-2016, 06:05 AM
Guessed's Avatar
Guessed Guessed is online now Copy text to new document based on paragraph numbering Windows 10 Copy text to new document based on paragraph numbering Office 2013
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 1,169
Guessed has a spectacular aura aboutGuessed has a spectacular aura aboutGuessed has a spectacular aura about
Default

That is somewhat clearer. We can understand what you want now.

This is larger than I have time to help on right now. If no-one has come up with a solution in a couple of days then I might be able to have a go at it. To help with terminology, I would be expecting you want a userform with a multi-select listbox listing all the headings and the macro would hide any unselected (outlined) ranges.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #8  
Old 11-22-2016, 06:14 AM
mike.mm mike.mm is offline Copy text to new document based on paragraph numbering Windows 7 32bit Copy text to new document based on paragraph numbering Office 2013
Novice
Copy text to new document based on paragraph numbering
 
Join Date: Nov 2016
Posts: 5
mike.mm is on a distinguished road
Default

userform with multi-select list box is correct and instead of hiding unwanted text create a new document and paste the wanted text...


I think I have mentioned it before but it is basically document which has about 50 pages and the table of contents is created based on paragraphs used... the 50 pages is lets say is detailed manual and I need an approval from manger. manager needs to see just key things... so I want to run macro select important stuff, create new document paste there... I can later save it and give just the small summary over to manager for approval... this is the reason behind...


Thanks again Guessed !
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy text to new document based on paragraph numbering Multi-Level Clause Numbering - copy while retaining original numbering TonySpeels Word 2 08-17-2016 11:18 AM
How to do task based on paragraph numbering after find PRA007 Word VBA 5 12-15-2015 11:32 PM
a macro that can copy data from copy.xls to our current excel macro.xls based on criteria: udhaya Excel Programming 1 11-12-2015 10:12 AM
Copy text to new document based on paragraph numbering How to select and copy to clipboard an entire document except for a paragraph and keep formatting TD_123 Word VBA 7 06-16-2015 03:30 PM
Display paragraph of text based on value selected in combo WordWaza Word 0 08-09-2013 06:30 AM


All times are GMT -7. The time now is 05:16 PM.


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