Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-28-2015, 01:05 AM
josia josia is offline Macros to convert text to Table Windows 7 32bit Macros to convert text to Table Office 2010 32bit
Novice
Macros to convert text to Table
 
Join Date: Aug 2015
Posts: 2
josia is on a distinguished road
Default Macros to convert text to Table

Hi Friends,
I would like to ask your help on how to convert text to table using macros.
I receive the text like this:
Text1 text2. Some/text. [text3] This is just an example.
We need to create table with four (4) columns.
Text1” will be on the second column.
text2. Some/text. [text3] This is just an example.” Will be on the fourth column.



This really help me to speed up the work.
Thanks
Reply With Quote
  #2  
Old 08-28-2015, 04:16 AM
gmayor's Avatar
gmayor gmayor is offline Macros to convert text to Table Windows 7 64bit Macros to convert text to Table Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

In order to determine whether this is possible, it would be better if you supplied an actual sample (with several lines of text), as your example is meaningless.

If Word's own text to table function doesn't work it suggests there is no consistent format between the lines of text.

In order for a macro to be able to split the paragraphs into table cells there has to be a consistently available point which the macro can establish. There does not appear to be any such consistency in your example.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 08-28-2015, 05:06 AM
josia josia is offline Macros to convert text to Table Windows 7 32bit Macros to convert text to Table Office 2010 32bit
Novice
Macros to convert text to Table
 
Join Date: Aug 2015
Posts: 2
josia is on a distinguished road
Default

Attached here is a sample file
Attached Files
File Type: docx 2015_08_28_10_01_16.docx (20.9 KB, 13 views)
Reply With Quote
  #4  
Old 08-28-2015, 09:11 PM
gmayor's Avatar
gmayor gmayor is offline Macros to convert text to Table Windows 7 64bit Macros to convert text to Table Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

I don't think it is possible to come up with a solution that will convert the document to a table.

The document is formatted using frames to make up the columns. If you processed each frame separately, even in this extract the data is split between frames e.g. the first part of the second frame belongs to the end of the last part of the first frame.

If you remove the frames it creates a different set of problems.

The individual segments are not consistently formatted. Some have multiple paragraph breaks within a segment, others have different amounts of information.

I regret I can see no way to make this task easier using vba.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macros to convert text to Table I need to convert shaded text into highlighted text on about 80 different long documents. VBA macro? AustinBrister Word VBA 8 05-28-2015 02:42 PM
Convert Text To Table: Separate text at (Other)? tinfanide Word VBA 2 01-12-2015 05:26 AM
Macros to convert text to Table Convert image-text hybrids into plain text morlack Excel 4 12-03-2014 05:29 PM
Convert graphic to text in a table Jennifer Murphy Word 6 01-24-2013 12:56 PM
My plain text post got converted to rich text in a reply, how to convert it back? david.karr Outlook 0 01-05-2012 09:46 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:56 PM.


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