Excel - wrapping text in merged cells

Hello -

Could someone please tell me how to wrap text within merged cells? A simple example:

tell application "Microsoft Excel"
	activate
	make new workbook at beginning
	tell workbook 1
		tell window 1 to set view to normal view
		tell worksheet 1
			merge range "B4:D4"
			--set wrap text of cell 2 of row 4 to true -- this wraps just within first cell
			--set wrap text of range "B4:D4" to true -- this doesn't do anything
			set value of cell 2 of row 4 to "Four score and seven years ago our fathers brought forth..."
		end tell
	end tell
end tell

I’ve found VBA solutions that involve steps something like:

  1. calculate total width of range
  2. set leftmost cell to that width
  3. autofit the entire row
  4. set leftmost cell back to its original width
  5. merge the cells
  6. play with the row height somehow

or some permutation of those steps, but nothing I’ve tried works and it can’t be that complicated.

Thanks very much…

  • Dan

Well, I just noticed (duh) that the second “set wrap text” command actually does work - I just had to increase the row height. So now a different, but probably simpler problem - “autofit row 4” didn’t work but I’ll keep trying.

Thanks to anyone that may have been looking at this…

  • Dan