Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-25-2016, 08:20 AM
celiolopes celiolopes is offline Creating paragraph macro transform text into table Windows 7 32bit Creating paragraph macro transform text into table Office 2013
Novice
Creating paragraph macro transform text into table
 
Join Date: Aug 2016
Posts: 2
celiolopes is on a distinguished road
Default Creating paragraph macro transform text into table

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>
Reply With Quote
  #2  
Old 08-25-2016, 08:26 AM
celiolopes celiolopes is offline Creating paragraph macro transform text into table Windows 7 32bit Creating paragraph macro transform text into table Office 2013
Novice
Creating paragraph macro transform text into table
 
Join Date: Aug 2016
Posts: 2
celiolopes is on a distinguished road
Default

It seems that the correct result was out formatting. This is a table with 4 columns , ok?
Reply With Quote
  #3  
Old 08-25-2016, 04:03 PM
macropod's Avatar
macropod macropod is offline Creating paragraph macro transform text into table Windows 7 64bit Creating paragraph macro transform text into table Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
Reply

Tags
table, text, transform



Similar Threads
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
Creating paragraph macro transform text into table inserting wordwrap table causes paragraph break in text sodiumkpump Word Tables 1 08-05-2015 06:36 PM
Creating paragraph macro transform text into table Macro to Insert text into the beginning on specific paragraphs unless the paragraph is blank caboy Word VBA 2 04-01-2015 07:00 AM
Creating paragraph macro transform text into table Cannot find 'Transform' command under 'Text Effects' in WordArt 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

Other Forums: Access Forums

All times are GMT -7. The time now is 07:06 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft