PDA

View Full Version : Find/Replace With Indent and Paragraph Help



rsrasc
01-24-2023, 01:45 PM
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!

macropod
01-24-2023, 03:08 PM
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

rsrasc
01-25-2023, 08:32 AM
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.

rsrasc
01-28-2023, 02:51 PM
Well, after thinking about my reply, I remembered using the below wildcard Find/Replace to solve my issue with indentation.

Find = ^p
Replace = ""



Cheers!

kaileybutler
01-29-2023, 12:59 AM
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?

rsrasc
01-29-2023, 03:31 PM
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!