Consulting

Results 1 to 2 of 2

Thread: Select paragraphs between words

  1. #1

    Select paragraphs between words

    Hi Guys,

    I have a bunch of rtf files from which I need to extract the paragraphs between certain words. Here is what I want to do:

    1. Open file: "file1.rtf"

    2. Select the paragraphs between "item 1" and the next "item 2". It might have multiple occuances:

    Item 1
    ...
    ...
    Item 2

    Item 1
    ...
    ...
    Item 2

    3. Copy and paste the selected paragraphs into a seperate word file.

    Any help is greatly appreciated. Thanks!

  2. #2
    VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    Hi mathzhang,

    What have you coded so far? Post your code and tell us which part(s) you're having trouble with and we'll see how we can help you solve the problems.

    For some code to loop through all files of a given type in a folder, see the code I've posted at:
    http://www.vbaexpress.com/forum/showthread.php?t=34992
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •