Hi all
I have Form like this: Điền Email để nhận file
And Script auto send email when Form Submit
Please help me email can attachment .rar file or .xlsm file.
Thanks
I have Form like this: Điền Email để nhận file
And Script auto send email when Form Submit
VBA Code:
function email() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName('NQ');
var recipient = sheet.getRange(sheet.getLastRow(), 2).getValue();
var subject = 'Send file';
var name = sheet.getRange(sheet.getLastRow(), 3).getValue();
var chinhanh = sheet.getRange(sheet.getLastRow(), 4).getValue();
var body = 'hallo ' + name + ' - ' + chinhanh +', \r\n Download file belove';
MailApp.sendEmail(recipient, subject, body);
}
Please help me email can attachment .rar file or .xlsm file.
Thanks