Simpatie.ro - matrimoniale
Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Nou pe simpatie:
sweet_kiss55555
Femeie
25 ani
Bucuresti
cauta Barbat
30 - 53 ani
Mrrrr's Forum (VIEW ONLY)ReguliInregistrareLoginPozeNu sunteti logat. Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides /

[OFFICE SCRIPTS] Send Email From Excel

Pagini: 1 Moderat de TRaP, TonyTzu
#1
Mrrrr
AdMiN
Postari: 2388
Source:
https://youtu.be/hAhk4RxNv9c?t=690

Requirements: Office 365


function main(workbook: ExcelScript.Workbook) {

    // Create variables
    let ws = workbook.getActiveWorksheet();
    let name = ws.getRange("C3").getText();
    let emailAddress = ws.getRange("C4").getText();
    let quote = ws.getRange("C12").getText();
    let img = ws.getRange("B6:C10").getImage();
    let imgHtml = `<img src="data:image/png;base64,` + img + `"style="width:400px"/><br/><br/>`

    let emailBody =
    `Hi ` + name + `<br/><br/>
    Please the quote is <strong>£` + quote + `.</strong><br/><br/>
    Which is based upon the following:<br/>
    ` + imgHtml + `<br/><br/>
    If you wish to accept the quote, let me know.<br/><br/>
    Kind regards,<br/><br/>
    Mark`

    // Send the e-mail
    OfficeScript.sendMail({
        to: emailAddress,
        subject: "Quote",
        contentType: OfficeScript.EmailContentType.html,
        content: emailBody
    });
};


_______________________________________


 
   
Pagini: 1  
Mergi la