RangetoHTML is a Function. Get the code from the link Rajesh posted above.