Link to home
Start Free TrialLog in
Avatar of Ivo Raemy
Ivo Raemy

asked on

Word VBA; set width of the cells after a split

Hello

I want to format a word table.

1. I want to catch the with of the current cell. (how can I doi this?)

2. I merge 2 cells,
Selection.MoveRight Unit:=wdCharacter, Count:=2, Extend:=wdExtend
    Selection.Cells.Merge

Open in new window



3. then i to  
Selection.MoveRight Unit:=wdCell 

Open in new window


until I am on a new row


4 now, i do a split

Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
Selection.Cells.Split NumRows:=1, NumColumns:=2, MergeBeforeSplit:=True

Open in new window


How do I set the width of the new cells? The width sould be the same as before the merge.


freundliche Grüsse

Ivo Raemy
ASKER CERTIFIED SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ivo Raemy
Ivo Raemy

ASKER

Dear Sir

I thank you for this solution. It suits my problem.

freundliche Grüsse

Ivo Raemy