Consulting

Results 1 to 6 of 6

Thread: Find/Replace With Indent and Paragraph Help

  1. #1
    VBAX Regular
    Joined
    Apr 2011
    Posts
    72
    Location

    Find/Replace With Indent and Paragraph Help

    Hello all,

    I was wondering if there is a find/replace code that will indent sentences/and or paragraphs to the left. In addition to that I would like to know if sentence or a line having 2 or 3 additional line of information can be wrap it up.

    For example, see attached document but I will show you just a couple of lines from it.

    The first sentences shows as follows:

    1.Then Job answered:
    2."Yes, I know that it is so,
    but how can a mortal be righteous before.....

    With some code, would it be possible to do the following:

    1.Then Job answered:
    2."Yes, I know that it is so, but how can a mortal be righteous before.....

    Not sure if this can be done with a whole document or just a selection. My document is a Bible containing over 2,000 pages.
    As always any help is appreciated.

    Cheers!
    Attached Files Attached Files

  2. #2
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    If you format you indent styles with the appropriate hanging indents, all you need is a wildcard Find/Replace with:
    Find = ^13([A-Za-z])
    Replace = ^l\1
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    VBAX Regular
    Joined
    Apr 2011
    Posts
    72
    Location
    Hi Macropod,

    Thank you for the code. Just got a question. Would it be possible to explain what you mean if I format my indent with the appropriate hanging indents? Do I need to highlight or select the whole document and then apply the appropriate or corresponding style? Not sure about this, and which way to go. I tried different things but I'm sure I did something wrong.

    Finally, thank you for your cooperation. Much appreciated.

  4. #4
    VBAX Regular
    Joined
    Apr 2011
    Posts
    72
    Location
    Well, after thinking about my reply, I remembered using the below wildcard Find/Replace to solve my issue with indentation.

    Find = ^p
    Replace = ""



    Cheers!

  5. #5
    Can you tell me🙏 what if the search usually always appeared on the left side of the page, and then suddenly began to appear exactly the advanced search window. But it is not convenient, and you want to return exactly the search on the left side. What to do?
    Auto parts store Riewes - buy spare parts for a car

  6. #6
    VBAX Regular
    Joined
    Apr 2011
    Posts
    72
    Location
    Hi Kailey, not sure what you mean with your statement (especially you are mentioning the word "search") but I suggest you download the word document that I attached with my posting, and you will see what I was trying to accomplish. Open (download) the word document, copy my macro, run it, and you will see the result. The purpose of this that was to bypass the suggestion given by Macropod about the styles and using the following wildcard:

    Find = ^13([A-Za-z])
    Replace = ^l\1


    The suggestion given by Macropod to do the following and I quote: "If you format you indent styles with the appropriate hanging indents" was really difficult for me to understand since I don't really use styles at all. I tried a couple of options by clicking some of the styles but my lack of knowledge was uhhhmmmm....don't know how to do it and then trying to apply the wildcard.

    Therefore, with the code I attached I was able to get the same result. It's not perfect but does what I need.

    Cheers!

Posting Permissions

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