![]() |
|
#1
|
|||
|
|||
![]()
Hello! I have a very limited knowledge of VBA and would like to count on the help of forum members to resolve the issue below. I need to format the text below transforming it into a table. The table will have 4 columns. VBA need to find the "process" and copy it to the first cell of the empty table in column 1. After that the macro needs to find the " Author" and copy it to the first empty cell in column 2 . After that the macro needs to find the " Respondent " and copy it to the first empty cell in column 3 . After that the VBA need to find the " Adv " and copy it to the first empty cell in column 4 . After that the macro sequence in the execution and makes the whole process again , only this time on the bottom line . After finishing all the text analyze the macro to the process. I thank the attention.
NOTES THAT MAY HELP IN THE CREATION OF MACRO : Process: The process will always have 20 numbers plus 4 special characters. Field process is always preceded by a number followed by a hyphen. Author: The author is always preceded by the word " author " and ends with a " semicolon " Defendant : The defendant is always preceded by the word " defendant " and ends with an "end point " Adv : The lawyer is always preceded by the word " adv - " and ends with "=>" Only the process field that has a standard size, all other fields have different sizes ... It would be interesting if the macro generates a new file with the result. TEXT TO BE USED: 00295 - 5057598-53.2016.8.13.0024 Autor : Banco Volkswagen S/A; Réu : Claudia da Silveira Gomes Esteves. Adv - Ivan Mercedo de Andrade Moreira, Celso Henrique dos Santos, William Batista Nesio => Esta publicação não possui efeito de intimação. 00296 - 5083602-30.2016.8.13.0024 Autor : Bv Financeira Sa Credito Financiamento e Investimento; Réu : Fernanda Rocha Coelho. Adv - Fernando Luz Pereira => Esta publicação não possui efeito de intimação. 00297 - 6006633-88.2015.8.13.0024 Autor : Bv Financeira Sa Credito Financiamento e Investimento; Réu : Antonio Carlos Sobrinho. Adv - Giulio Alvarenga Reale => Esta publicação não possui efeito de intimação. 00360 - 6079296-35.2015.8.13.0024 Autor : Bradesco Administradora de Consórcio Ltda; Réu : Maria Cristina Parreiras de Oliveira. Adv - Pedro Roberto Romao => Esta publicação não possui efeito de intimação. CORRECT RESULT: <table> <tr> <th>PROCESSO</th> <th>AUTOR</th> <th>RÉU</th> <th>ADV</th> </tr> <tr> <td>5057598-53.2016.8.13.0024</td> <td>Banco Volkswagen S/A</td> <td>Claudia da,Silveira<br>Gomes Esteves</td> <td>Ivan Mercedo de,Andrade Moreira, Celso<br>Henrique dos Santos,,William Batista Nesio</td> </tr> <tr> <td>5083602-30.2016.8.13.0024</td> <td>Bv Financeira Sa<br>Credito Financiamento e,Investimento</td> <td>Fernanda Rocha Coelho</td> <td>Fernando Luz Pereira</td> </tr> <tr> <td>6006633-88.2015.8.13.0024</td> <td>Bv Financeira Sa<br>Credito Financiamento e,Investimento</td> <td>Antonio Carlos Sobrinho</td> <td>Giulio Alvarenga Reale</td> </tr> <tr> <td>6079296-35.2015.8.13.0024</td> <td>Bradesco Administradora<br>de Consórcio,Ltda</td> <td>Maria Cristina<br>Parreiras de Oliveira</td> <td>Pedro Roberto Romao</td> </tr> </table> |
#2
|
|||
|
|||
![]()
It seems that the correct result was out formatting. This is a table with 4 columns , ok?
|
#3
|
||||
|
||||
![]()
Without seeing the data in a file in the form in which you receive it for processing and, likewise, without seeing an example of how the data are supposed to look in an actual Word document, it can be difficult for anyone to advise on the issue. Can you attach a sample data file and document to a post with some representative data? You can do this via the paperclip symbol on the 'Go Advanced' tab at the bottom of this screen.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
Tags |
table, text, transform |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pasting text from Excel cell into word without creating a table, and keeping the in-cell formatting | hanvyj | Excel Programming | 0 | 08-28-2015 01:15 AM |
![]() |
sodiumkpump | Word Tables | 1 | 08-05-2015 06:36 PM |
![]() |
caboy | Word VBA | 2 | 04-01-2015 07:00 AM |
![]() |
billfry | Drawing and Graphics | 1 | 11-26-2013 02:21 PM |
3x1 Table: text in fields loses paragraph format when being bulleted | madasco | Word | 3 | 06-07-2013 06:44 AM |