Help w/Merge Cells Macro
can me short macro please? i've got table can have different amounts of columns (5 10) , lots of rows of course. i'd click left cell in given row then run a macro will:
- select cells right
- merge cells
- enter text, "notes:" cell along
- enter one: carriage return
that's it. please? (i can't write vba crap!)
in advance!!!
~dax
try this:
sub mergecells() dim doc as word.document dim rng as word.range set doc = word.activedocument set rng = word.selection.range if rng.information(wdwithintable) then rng.startof unit:=word.wdrow rng.endof unit:=word.wdrow, extend:=word.wdextend rng.cells.merge rng.text = "notes:" & vbcr end if end sub
kind regards, rich ... http://greatcirclelearning.com
Microsoft Office > Word IT Pro Discussions
Comments
Post a Comment