function createDoc() {
const doc = DriveApp.getFileById('DOCUMENT ID');
const docFolder = DriveApp.getFolderById('FOLDER ID')
const docSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Data Source')
const docRows = billingSheet.getDataRange().getValues();
//Used to skip the header in Google Sheets and skip any rows that do not have an "X" in a specified column
billingRows.forEach(function(row, index){
if (index === 0) return;
if (row[2]) return;
const docCopy = doc.makeCopy(`${row[0]} Request` , billingTempFolder);
const docDoc = DocumentApp.openById(docCopy.getId());
const docBody = docDoc.getBody(); //this works at replacing the text as listed below
const docFooter = docDoc.getFooter(); //this does not work the same way as replacing the body
docFooter.replacetext('{{Reference Number}}', row[0]);
docBody.replaceText('{{Reference Number}}', row[0]);
docBody.replaceText('{{Version}}', row[3]);
docBody.replaceText('{{Name}}', row[4]);
billingBody.replaceText('{{State}}', row[5]);
docDoc.saveAndClose();
If anyone has any suggestions, I would greatly appreciate it. Thank you!!