Tengo un modelo de un diploma y quiero saber como hacer una macro para copiar los datos de una lista excel a power point?
Esta es la macro que tengo pero al parecer esta mal. Ojala me puedan ayudar.
Sub COMBINAR()
Dim shtPARTICIPANTES As Worksheet
Dim strPARTICIPANTES As String
Dim NOMBRE As Long
Dim CUIP As Long
Dim ADSCRIPCION As Long
Dim CURSO As Long
Dim FECHA As Long
Dim FOLIO As Long
Dim objPPT As Object
Dim objPres As Object
Dim objSld As Object
Dim objShp As Object
Set shtPARTICIPANTES = Worksheets("PARTICIPANTES")
Set objPPT = CreateObject("Powerpoint.Application")
objPPT.Visible = True
Set objPres = objPPT.presentations.Open(ThisWorkbook.Path & "\CONSTANCIA.pptx")
objPres.SaveAs ThisWorkbook.Path & "\COMBINADOS.pptx"
filaInicial = 2
Do While shtPARTICIPANTES.Cells(filaInicial, 1) <> ""
strPARTICIPANTES = shtPARTICIPANTES.Cells(filaInicial, 1)
Do While shtPARTICIPANTES.Cells(filaInicial, 2) <> ""
strPARTICIPANTES = shtPARTICIPANTES.Cells(filaInicial, 2)
Do While shtPARTICIPANTES.Cells(filaInicial, 3) <> ""
strPARTICIPANTES = shtPARTICIPANTES.Cells(filaInicial, 3)
Do While shtPARTICIPANTES.Cells(filaInicial, 4) <> ""
strPARTICIPANTES = shtPARTICIPANTES.Cells(filaInicial, 4)
Do While shtPARTICIPANTES.Cells(filaInicial, 5) <> ""
strPARTICIPANTES = shtPARTICIPANTES.Cells(filaInicial, 5)
Do While shtPARTICIPANTES.Cells(filaInicial, 6) <> ""
strPARTICIPANTES = shtPARTICIPANTES.Cells(filaInicial, 6)
Set objSld = objPres.slides(1).Duplicate
If objShp.HasTextFrame Then
If objShp.TextFrame.HasText Then
ObjShp. TextFrame. TextRange. Replace "<NOMBRE>", strPARTICIPANTES
ObjShp. TextFrame. TextRange. Replace "<CUIP>", strPARTICIPANTES
ObjShp. TextFrame. TextRange. Replace "<ADSCRIPCION>", strPARTICIPANTES
ObjShp. TextFrame. TextRange. Replace "<CURSO>", strPARTICIPANTES
ObjShp. TextFrame. TextRange. Replace "<FECHA>", strPARTICIPANTES
ObjShp. TextFrame. TextRange. Replace "<FOLIO>", strPARTICIPANTES
End If
End If
Next
filaInicial = filaInicial + 1
Loop
objPres.slides(1).Delete
ObjPres. Save
ObjPres. Close
End Sub