#1   Report Post  
Posted to microsoft.public.word.docmanagement
JTEFUN JTEFUN is offline
external usenet poster
 
Posts: 3
Default FORMATION COLUMNS

I need to take a srting of data and break it apart by columns and only 7
characters per column. Is this something that is posible?
--
JTEFUN
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
kdrungilas kdrungilas is offline
external usenet poster
 
Posts: 3
Default FORMATION COLUMNS

You can change any group of text to columns by using Word's convert text
feature, however, you can only convert to a specific width in Word, not a
number of characters. [Table...|Convert...|Text to table...]

It might be easier to do your conversion in Excel. You can paste your string
of data into a cell and then use the [Data...|Text to columns...] buttons.
You would need to specify "Fixed width" rather than "Delimited" then [Next]
and physically move the break lines between your columns to points 7, 14, 21,
28, 35, and so on, on the Data preview graph. you can drag extra lines off
the scale. This will separate your data every 7 characters even if there are
spaces, commas or other characters.

Highlight your new columns and you can paste into Word or imbed the excel
table into your document.
kathy

"JTEFUN" wrote:

I need to take a srting of data and break it apart by columns and only 7
characters per column. Is this something that is posible?
--
JTEFUN

  #3   Report Post  
Posted to microsoft.public.word.docmanagement
alborg alborg is offline
external usenet poster
 
Posts: 67
Default FORMATION COLUMNS

Gosh, I don't know why you would want to do this, but I agree with Kathy that
Excel would be an easier environment to do this feat. You can do it inside MS
Word by parsing the text with a Do While... Loop and adding in the commas
every 7 characters. I would do is something like this:

Sub test()
Dim ii As Long, xx As String, yy As String, myRange As Range
Set aDoc = ActiveDocument
Set myRange = aDoc.Range(Start:=aDoc.Paragraphs(1).Range.Start,
End:=aDoc.Paragraphs(1).Range.End)
myRange.ConvertToTable Separator:=wdSeparateByParagraphs
ii = Len(myRange)
xx = myRange
myRange.Delete
Do While ii 0
If ii 7 Then
yy = yy & xx
ii = 0
Else
yy = yy & Left(xx, 7) & ", "
ii = ii - 7
xx = Right(xx, ii)
End If
Loop

With Selection
.Collapse
.InsertBefore yy
End With
Set myTable = _
Selection.ConvertToTable(Separator:=wdSeparateByCo mmas, _
Format:=wdTableFormatList1)
End Sub

Good luck... With the above I ended up taking a 229 character paragraph and
separating it into skinny little columns, each with 7 lined up characters.
Kind of ugly, but it seems to be what you want. 8^)

Cheers,
Al

"JTEFUN" wrote:

I need to take a srting of data and break it apart by columns and only 7
characters per column. Is this something that is posible?
--
JTEFUN

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Styles, formation and the normal template Word 2003 DMW Microsoft Word Help 2 February 3rd 07 03:06 PM
I want to stop columns, Add a sentance, add more columns Jack Sprat Microsoft Word Help 3 May 30th 06 05:35 AM
I have four columns and want to freely tab between all columns. Trinity77 Page Layout 2 February 16th 06 07:19 PM
"Click columns, st. toolbar" - can't find picture or word columns Merrijo Tables 1 September 16th 05 09:47 PM
find a font a child can trace over to learn letter formation Sian Microsoft Word Help 1 July 27th 05 03:44 PM


All times are GMT +1. The time now is 10:39 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"