Manage Letter Address in Microsoft Word

Hello All,

Currently i had to download Letter (Word) from my system and need to tidy up the text Address (add enter) and make sure the text address not pass mid column.
Before :
image
After :

Any solution to achieve this goals?

Regards,

Hi @aliaga,

What is the rule of this text? When the system parse the content and put a new line?

If you can give some details, i will try to help.

Regards.
Ömer

Hi @omer.ozturk ,

Thankyou for your response.
For the rule :slight_smile:
Input new line if found letter ‘Kec’,‘RT/RW’
image

Regards,

@aliaga / @obf ,

With the help of Regex Split we should be able to Split the data based on the words mentioned like below :

Regex.Split(wordText,"(?=KEC)|(?=RT\/RW:)")

Hence, after the Split, joining based on New line should be the expected Output that you would require. Although, the method may not be fully concrete for now, But we could do a more analysis once you could let us know if the method provided satisfies the requirement or still a further more enhanced version would be necessary.

Check the workflow Below :
Word_Arrange_AddressText.zip (17.5 KB)

Provide us a feedback on the method established and it’s outcome.

Hi @supermanPunch ,

Thankyou for your response,
need to confirm that regex rule above.

In case i need to add new rule/word to be add new line, it will be :

Regex.Split(wordText,"(?=KEC)|(?=RT\/RW:),(?=JAKARTA)")

Regards,

@aliaga ,

The Additional words should be added with an OR (|), not a comma, The Expression would be like below :

Regex.Split(wordText,"(?=KEC)|(?=RT\/RW:)|(?=JAKARTA)")

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.