Convert this macro to office script

Ramon Verde Jimenez 0 Reputation points

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

Sub Envio_Datos()


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"
     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.
902 questions
0 comments No comments
{count} votes