Convert this macro to office script

Ramon Verde Jimenez 0 Reputation points
2023-04-04T20:23:38.7166667+00:00

Hi! Could you help me? I need convert this macro to office script Thank you!!!


Sub Envio_Datos()


ActiveSheet.Range("A3:L19").Select



For i = 1 To ThisWorkbook.Sheets("DATOS").Range("A4").Value

    ThisWorkbook.Sheets("Envio").Range("A1").Value = i
    
    
    ActiveWorkbook.EnvelopeVisible = True         

    With ActiveSheet.MailEnvelope        
        .Item.To = ThisWorkbook.Sheets("Envio").Range("B1").Value
        .Item.Subject = "Acumulado mensual Objetivos - PRV"
        .Item.Send
     End With
 Next i
 End Sub 
JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
942 questions
0 comments No comments
{count} votes