+ Reply to Thread
Results 1 to 5 of 5

If a string is longer then one line, the following lines should be tabed

  1. #1
    Forum Contributor
    Join Date
    11-12-2007
    Location
    Germany
    MS-Off Ver
    2007
    Posts
    472

    If a string is longer then one line, the following lines should be tabed

    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:
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,607
    Some observations:
    1. You did not set any tabs, or indents...
    2. 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:
    1. On the ruler bar I set the "hanging indent" for the first definition at about 1/2 inch.
    2. I set the paragraph spacing to 0 points before and 3 points after (original was 0 & 10)
    3. I renamed the newly formatted paragraph style from Normal to "excelforum"
    4. 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

    Ben Van Johnson

  3. #3
    Forum Contributor
    Join Date
    11-12-2007
    Location
    Germany
    MS-Off Ver
    2007
    Posts
    472
    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?!
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,607
    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.

  5. #5
    Forum Contributor
    Join Date
    11-12-2007
    Location
    Germany
    MS-Off Ver
    2007
    Posts
    472
    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.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1