Problem wrapping text on export to Excel

Is there a trick to wrapping text within merged cells when exporting data to Excel? I can get the text to wrap in a cell if it is not merged with another cell, but I can’t get the wraptext to work in merged cells. A portion of my code is below:

oexcel.cells(irow, 2) = doc.ColumnValues(2)

drange=“B” & Cstr(irow) & “:” & “E” & Cstr(irow)

oexcel.Range(drange).Select

oexcel.Selection.mergecells = True

oexcel.Selection.HorizontalAlignment =-4131

oexcel.Selection.wraptext = True

Thanks …

Subject: Problem wrapping text on export to Excel

I’m not sure this will help but…

Once you merge the cells, Excel now considers the selection as B1.

Maybe if you add a line of code that selects ‘B1’ prior to wraptext = True.

HTH.

Subject: Thanks, but no luck.