jamescol
07-11-2004, 11:51 PM
OK, I need some validation of my thought. I'm testing to see if a cell in a table is blank. Using:
If ActiveDocument.Tables(3).Cell(lRows, 1).Range.Text = ""
doesn't work when the cell is blank. The code always run the IF statement. So I checked the Len of the cell, and see that it is 2 when the cell is blank. I assume there is some sort of hidden formatting code in the cell.
So should I check the cell's length? Like
If Len(ActiveDocument.Tables(3).Cell(lRows, 1).Range.Text -2) = 0
Or is there a better method?
Oh yeah, and does anyone know what the 2 hidden characters/codes in the cell are? Curious
Thanks,
James
If ActiveDocument.Tables(3).Cell(lRows, 1).Range.Text = ""
doesn't work when the cell is blank. The code always run the IF statement. So I checked the Len of the cell, and see that it is 2 when the cell is blank. I assume there is some sort of hidden formatting code in the cell.
So should I check the cell's length? Like
If Len(ActiveDocument.Tables(3).Cell(lRows, 1).Range.Text -2) = 0
Or is there a better method?
Oh yeah, and does anyone know what the 2 hidden characters/codes in the cell are? Curious
Thanks,
James