Generation

generate functionSun, 16 Jul 2023

Option Explicit Sub Combinar() Dim BaseDatos As Worksheet Dim Variable1 As String Dim Variable2 As String Dim Variable3 As String Dim Variable4 As String Dim filaInicial As Long Dim CrearObjPowerPoint As Object Dim LibroPowerPoint As Object Dim HojaPowerPoint As Object Dim NombreVariable As Object Set BaseDatos = Worksheets("BD") Set CrearObjPowerPoint = CreateObject("Powerpoint.Application") CrearObjPowerPoint.Visible = True Set LibroPowerPoint = CrearObjPowerPoint.presentations.Open(ThisWorkbook.Path & "\Plantilla.pptx") LibroPowerPoint.SaveAs ThisWorkbook.Path & "\CombinacionesCorrespondencia.pptx" filaInicial = 2 Do While BaseDatos.Cells(filaInicial, 1) <> "" Variable1 = BaseDatos.Cells(filaInicial, 1) Variable2 = BaseDatos.Cells(filaInicial, 2) Variable3 = BaseDatos.Cells(filaInicial, 3) Variable4 = BaseDatos.Cells(filaInicial, 4) Set HojaPowerPoint = LibroPowerPoint.slides(1).Duplicate For Each NombreVariable In HojaPowerPoint.Shapes If NombreVariable.HasTextFrame Then If NombreVariable.TextFrame.HasText Then NombreVariable.TextFrame.TextRange.Replace "<NOMBRE>", Variable1 NombreVariable.TextFrame.TextRange.Replace "<CURSO>", Variable2 NombreVariable.TextFrame.TextRange.Replace "<HORAS>", Variable3 NombreVariable.TextFrame.TextRange.Replace "<CIUDAD>", Variable4 End If End If Next filaInicial = filaInicial + 1 Loop LibroPowerPoint.slides(1).Delete LibroPowerPoint.Save LibroPowerPoint.Close End Sub

#include <iostream> using namespace std; int main () { int a,b; cout << "Ingrese el primer numero: "; cin >> a; cout << "Ingrese el segundo numero: "; cin >> b; cout << "El resultado de la suma es: " << a+b << endl; cout << "El resultado de la resta es: " << a-b << endl; cout << "El resultado de la multiplicacion es: " << a*b << endl; cout << "El resultado de la divicion es: " << a/b << endl; return 0; }

Questions about programming?Chat with your personal AI assistant