Google Sheet with a column of names merged with Google Doc
I realized I didn't need all those loops so I simplified things to 1 loop:

for (rowNum = 2; rowNum &lt;= lastRow; rowNum ++){
//Splitting names   
  var cell = range.getCell(rowNum,colNum).getValues()[0];
  var sCell = cell[0].split(", ");
  sheet.getRange(rowNum,colNum +1,1,sCell.length).setValues([sCell]);  
  var fName = sCell[1]; // first name
  var lName = sCell[0]; // last name

// make copy of doc and save as student name.    
  var docTemplate = DriveApp.getFileById(myDoc);
  var newFile = docTemplate.makeCopy(fName + lName);
  var newDoc = DocumentApp.openById(newFile.getId());
  DriveApp.getFolderById(myNewFolder).addFile(newFile);
  DriveApp.getFolderById(mySourceFolder).removeFile(newFile);

// replace text
  var body = newDoc.getBody();
  body.replaceText('{first name}', fName);
  body.replaceText('{last name}', lName);
  body.replaceText('{date}' , date);
  }