MACRO PARA INSERTAR LISTA DE EXCEL COMO TITULOS EN POWER POINT

1 post / 0 nuevos
gonzalo lopez
Imagen de gonzalo lopez
Offline
última acción: Hace 5 años 2 meses
alta: 18/01/2019 - 01:04
Puntos: 40
MACRO PARA INSERTAR LISTA DE EXCEL COMO TITULOS EN POWER POINT

Buenas noches

Amigo necesito ayuda para pasar una lista de excel a titulos en slides de power point y adicional insertar las imagenes que tiene la ubicacion en otra columna

Estoy usando la siguiente sentencia pero me hace falta el buckle para crear las nuevas hojas con los nombres y el de insertar las fotos

Sub Ejemplo1()

 

Dim pptApp As PowerPoint.Application

Dim pptPres As PowerPoint.Presentation

Dim pptSlide As PowerPoint.Slide

Dim pptShape As PowerPoint.Shape

Dim excelTable As Excel.Range

Dim archivoPPT As PowerPoint.Application

Dim diapositiva As PowerPoint.Slide

Dim tableranges As Excel.Range

Dim i As Integer

 

 

'Asignar la tabla que queremos copiar a la variable excelRange

Set excelTable = Worksheets("Ejemplo").Range("a2")

 

 

'Comprobar si PowerPoint esta abierto y en caso de no estarlo abrirlo

On Error Resume Next

Set pptApp = GetObject("", "PowerPoint.Application")

Err.Clear

If pptApp Is Nothing Then Set pptApp = CreateObject(class:="PowerPoint.Appliaction")

pptApp.Visible = True

pptApp.Activate

 

'Crear una nueva presentacion de PowerPoint

Set pptPres = pptApp.Presentations.Add

Set pptSlide = pptPres.Slides.Add(1, ppLayoutBlank)

 

'Copiar la tabla de Excel

excelTable.Copy

 

'Pegar la tabla de Excel en PowerPoint y centrarla en la diapositiva

pptSlide.Shapes.PasteSpecial(ppPasteEnhancedMetafile).Select

 

 

Set pptApp = Nothing

Set pptPres = Nothing

Set pptSlide = Nothing

Set pptShape = Nothing

Set excelTable = Nothing

Set archivoPPT = Nothing

Set diapositiva = Nothing

Set tableranges = Nothing

 

End Sub

 

 

AdjuntoTamaño
File datos_lopez.xlsm21.53 KB

Etiquetas: