marc_willemsen
(Fresh Scripter)
2004-12-04 11:39 PM
Split cells in word

How can I split a cell in word?
I'm creating a tabel and adding text to the cells but in one off the cells there are dynamically thing inserted and this should be splitted by cells.

Can you help me?
Thanx!!


Richard H.Administrator
(KiX Supporter)
2004-12-06 10:06 AM
Re: Split cells in word

Explain a little further. Give an example of what is happening, and what you are trying to do.

Sealeopard
(KiX Master)
2004-12-07 05:51 AM
Re: Split cells in word

Or read the VBScript Reference in the Microsoft Word Help.

marc_willemsen
(Fresh Scripter)
2004-12-13 10:44 PM
Re: Split cells in word

I have a table that has 5 rows and 3 colums.
I want to dynamically add items to the first colum but sometimes there will be 2 items in one colum, and sometimes even more. I want to split cells in a loop for as much as I need.

Short: when I need 2 things in one cell, I want to split the cell in to two. If I should need 3 things in the cell, I want to split the cell in to three cells.

Could you help me?
Example:
Code:
 $oTable.Cell(9,1).Range.InsertAfter("Print queues") 


Cell 9,1 needs to be split into 3 cells.

Thanx for your help!!


LonkeroAdministrator
(KiX Master Guru)
2004-12-13 10:55 PM
Re: Split cells in word

why you need to do this kinda stuff with script?
you obviously have someone already doing word documents for you, why that person can't write it properly forcing you modify it?

sure, it's doable but there clearly is some screw up on the way and that is what should be addressed, imho.


marc_willemsen
(Fresh Scripter)
2004-12-14 03:41 PM
Re: Split cells in word

What a stupid reply!
To answer your question: No, I don't have anybody making this document for me, I do It myself.

The only thing that I am doing 'wrong' is that I am a beginner!!!!!!! But thats why I've posted my question on this forum!


LonkeroAdministrator
(KiX Master Guru)
2004-12-14 05:18 PM
Re: Split cells in word

did I say wrong?
I clearly stated that the way you are going at it is weird.
if you are working with tables, why you are using word?
I hardly can understand excel for that but word is way beyond my sense of reasoning.


Jose
(Seasoned Scripter)
2004-12-14 11:28 PM
Re: Split cells in word

hello marc...sup?.
I recorded a macro, inserted a table and splited. This came out.
Code:
 Selection.Cells.Split NumRows:=1, NumColumns:=2, MergeBeforeSplit:=False 



Hope it helps


LonkeroAdministrator
(KiX Master Guru)
2004-12-15 08:43 AM
Re: Split cells in word

jose, you seem to be a com guru

Jose
(Seasoned Scripter)
2004-12-15 01:16 PM
Re: Split cells in word

Yeah!
I have so much knoledge about .COM sites that I am impressed of myself.