none
Finding ID & one by one Copy from Word file RRS feed

  • Question

  • Hi User's,

    I have one word document in this document have index Id every id have Heading & text part like this

    1 Heading

       Normal Text

       Diagrams

    1.1 Heading

          Normal Text

    1.1.1 Heading

             Normal Text

             Table

    1.1.1.2 Heading

    2 Heading

    2.1 Heading

          Normal Text

    I want to copy Id No.1(All part of 1) then 1.1 then 1.1.1 in acceding order one by one whole file copy

    Please give me code or any idea how can i do this 

     

    Friday, October 7, 2011 7:15 AM

Answers

  • Sounds like you could probably do what you want by creating a table of contents based on the heading styles and then select it and use Ctrl+Shift+F9 to unlink it from the headings so that it will be made up of ordinary text, which you can then copy and paste to where you wanted it.

    If necessary the process could be automated.


    Doug Robbins - Word MVP dkr[atsymbol]mvps[dot]org
    Saturday, October 8, 2011 1:10 AM
  • Hi patima,

    It might help you a lot to use the build-in TOC as Doug already suggested.

     

    To give you some heads up on how to build a TOC in VBA, see below thread in Word 2010 (earlier versions are simular):

    http://msdn.microsoft.com/en-us/library/ff835785.aspx

     

    Hope this helps,

     


    Daniel van den Berg | Washington, USA | "Anticipate the difficult by managing the easy"
    Tuesday, January 31, 2012 1:25 AM
    Moderator

All replies

  • Sounds like you could probably do what you want by creating a table of contents based on the heading styles and then select it and use Ctrl+Shift+F9 to unlink it from the headings so that it will be made up of ordinary text, which you can then copy and paste to where you wanted it.

    If necessary the process could be automated.


    Doug Robbins - Word MVP dkr[atsymbol]mvps[dot]org
    Saturday, October 8, 2011 1:10 AM
  • Above data as a running data format it is not a table.

    i show you data is like this

       1. This chapter describes the DXL Interaction window, DXL library, and the basic features of DXL.

           It covers the following topics:

    1.1 You can use the DXL Interaction window to develop

          small DXL programs.

    1.1.1 You can use the DXL Interaction window to develop small DXL programs.

    1.1.1.2 This chapter describes the DXL Interaction window, DXL library, and the basic features of DXL.       

                It covers the following topics:

    2      For large-scale program development, you should use a third party

            editing tool when coding, and then load your code into the see 1.1

    2.1  DXL Interaction window to execute and debug it.

          You can set up a menu option in see 2

    2.2  Rational DOORS to run your third party editing tool.

    I have lot of this kind of data & i want write macro to do search minimum object no in the whole document like  1 is minimum then copy whole data under 1 & paste it somewhere. Again search next object no like 1.1 copy data. Again search 1.1.1, 1.1.1.2, 2, 2.1, 2.2 this type whole document copy one by one and paste it

    somebody give me code because i am new in code

     

     

    Monday, October 10, 2011 9:53 AM
  • Hi patima,

    It might help you a lot to use the build-in TOC as Doug already suggested.

     

    To give you some heads up on how to build a TOC in VBA, see below thread in Word 2010 (earlier versions are simular):

    http://msdn.microsoft.com/en-us/library/ff835785.aspx

     

    Hope this helps,

     


    Daniel van den Berg | Washington, USA | "Anticipate the difficult by managing the easy"
    Tuesday, January 31, 2012 1:25 AM
    Moderator