#  Other Applications & Softwares  > Word Formatting & General >  >  If a string is longer then one line, the following lines should be tabed

## wali

Hello every one,

it seems that i am the first lucky one to post a thread in word area. :-)

Well now to my problem:

i have to make a layout for dictionary and every thing is well that far but i have problems with the lenths of the lines. I cant format my text in such a way that if a line is too long then the remainig part should not follow from the start of new line. 



Situation now (example):
آبادېدل   [ ābādedә́l ] v. i. bebaut werden; gebaut werden; ertragreich werden; fruchtbar werden; µسمسورېدل 
آزادي   [ āzādí ] n. f.  Freiheit f.; Unabhängigkeit f.; Befreiung f.; Entlassung f.; Freilassung f.; Lockerung f.; Souveränität f.; µخپلواکي 
آزمايش   [ āzmāyéš ] n. m. Prüfung f.; Überprüfung f.; Untersuchung f.; Erfahrung f.; Experiment; Versuch m.; µازموينه; ازمويښت 

Should get to:
آبادېدل   [ ābādedә́l ] v. i. bebaut werden; gebaut werden; ertragreich werden;
.......... fruchtbar werden; µسمسورېدل 
آزادي   [ āzādí ] n. f.  Freiheit f.; Unabhängigkeit f.; Befreiung f.; Entlassung f.;
.......... Freilassung f.; Lockerung f.; Souveränität f.; µخپلواکي 
آزمايش   [ āzmāyéš ] n. m. Prüfung f.; Überprüfung f.; Untersuchung f.; Erfahrung f.; 
..........Experiment; Versuch m.; µازموينه; ازمويښت

Here is the example file:

----------


## protonLeah

Some observations: You did not set any tabs, or indents... It seems that you used "Shift+enter" to insert manual line breaks whenever you wanted a new line.  Because of that, you essentially have only ONE PARAGRAGH that includes the entire page. 
-----------------------------
What I did:On the ruler bar I set the "hanging indent" for the first definition at about 1/2 inch.I set the paragraph spacing to 0 points before and 3 points after (original was 0 & 10)I renamed the newly formatted paragraph style from Normal to "excelforum"I replaced your "shift+enter" with "Enter" to create new paragraphs, except for the yellow highlighted word.Note:
  If you enable viewing of the formatting codes, you will see the "bent arrow" enter symbol at the end of every one of _your_ lines.  Normally, you don't do that, just keep typing and let Word wrap and indent new lines in the current paragraph. 
  Each one of your definitions is actually the start of a new paragraph, so, just press enter to start a new paragraph (¶).

now-is(mod bvj).zip

----------


## wali

hi,
thank you very much for your answer. Yes thats how i want the text to look like. But i have a word file which contains of over 700 pages. 

I couldnt solve my problem yet cus the whole word document (over 700 pages) already exist and i would like to change the whole document at once or highlighted area if possible. How can i do it without having to correct each line manually? 

I have my whole dictionary originaly in excel. I added new columns before and after each column adding html tags. Then i copied all cells including code into a text file and saved it as html file (utf 8). I opened html file with IE and highlighted the whole text and pasted it in a word page. That way i created the word file from excel.

Now the question is: is it possible to formate the whole new created wordfile the way like the file you have posted?

Please refer to the attachment, which contains a sample of excel file and sample of html file. May be changing the html code can help?!

----------


## protonLeah

The macro below worked on the test file you posted.  It may have to be adjusted, so try it out on a backup copy of your file.




```
Please Login or Register  to view this content.
```

----------


## wali

Hello Ben,
thank you very much for the code. It works perfect with all 700 pages. It would save me at least one month of boring job. thanks

There are two more things which would made the code biger help. Is it possible to modify the code in such a way that:

First:

If a string is too long then it should only be broken directly after  the last possible ";". That way it will hinder that the half of meaning is in one line and half in another.

for example:

Now;
آزادي [ āzādí ] n. f.  Freiheit f.; Unabhängigkeit f.; Befreiung f.; Entlassung f.; Freilassung f.; Lockerung 
.......f.; Souveränität f.; µخپلواکي 

should be:
آزادي [ āzādí ] n. f.  Freiheit f.; Unabhängigkeit f.; Befreiung f.; Entlassung f.; Freilassung f.;
........Lockerung f.; Souveränität f.; µخپلواکي 


Second:

If a string is too long and it is to be broken after "µ" then the macro should controll if all the synonyms fit in the second line. If all of them fit into secondline then the first line should be broken directly before "µ". So if we need two lines any way, then it will be better to have the synonyms in a seperate line.

For example:

Now:
آزمايش [ āzmāyé ] n. m. Prüfung f.; µازموينه; ازمويښت ;ازموينه;
 .........ازمويښت ;ازموينه; ازمويښت ;ازموينه; ازمويښت

should be:
آزمايش [ āzmāyé ] n. m. Prüfung f.;
 ........µازموينه; ازمويښت ;ازموينه; ازمويښت ;ازموينه; ازمويښت ;ازموينه; ازمويښت

Thank you very much.

----------

