Pass document to Ranges.fromPosition() calls