Beruflich Dokumente
Kultur Dokumente
19/12/2018
'
----------------------------------------------------------------------
----------
' Pone todos los placeholders con el idioma que se le indique en la
variable idioma
'
----------------------------------------------------------------------
----------
Sub LangInFrames()
' español
' idioma = msoLanguageIDSpanish
' inglés
' idioma = msoLanguageIDEnglishUK
' francés
' idioma = msoLanguageIDFrench
For j = 1 To scount
fcount = ActivePresentation.Slides(j).Shapes.Count
For k = 1 To fcount
ActivePresentation.Slides(j).Shapes(k).TextFrame.TextRange.LanguageID
= idioma
End If
' tablas
If ActivePresentation.Slides(j).Shapes(k).HasTable =
True Then
For sh = 1 To fcount
ColCount =
ActivePresentation.Slides(j).Shapes(k).Table.Columns.Count
RowCount =
ActivePresentation.Slides(j).Shapes(k).Table.Rows.Count
ActivePresentation.Slides(j).Shapes(k).Table.Cell(filas,
columnas).Shape.TextFrame.TextRange.LanguageID = idioma
Next
Next
Next
End If
Next k
Next j
End Sub
Sub FuentesIguales()
Dim ColCount As Integer
Dim RowCount As Integer
Dim sh As Integer
Dim filas, columnas As Integer
Dim idioma As String
scount = ActivePresentation.Slides.Count
For j = 1 To scount
fcount = ActivePresentation.Slides(j).Shapes.Count
For k = 1 To fcount
ActivePresentation.Slides(j).Shapes(k).TextFrame.TextRange.Font.Name =
fuente
End If
' tablas
If ActivePresentation.Slides(j).Shapes(k).HasTable =
True Then
For sh = 1 To fcount
ColCount =
ActivePresentation.Slides(j).Shapes(k).Table.Columns.Count
RowCount =
ActivePresentation.Slides(j).Shapes(k).Table.Rows.Count
ActivePresentation.Slides(j).Shapes(k).Table.Cell(filas,
columnas).Shape.TextFrame.TextRange.Font.Name = fuente
Next
Next
Next
End If
Next k
Next j
End Sub
Reemplazar fuentes
Si tienes algunos textos en una fuentes, y quieres cambiarlos a otra (por
ejemplo, pasar de Arial a Helvética), usa esta macro indicando la fuente antigua
y la fuente nueva.
Sub Reemplazar_Fuentes()
Dim ColCount As Integer
Dim RowCount As Integer
Dim sh As Integer
Dim filas, columnas As Integer
Dim fuente_vieja As String
Dim fuente_nueva As String
fuente_vieja = "Arial"
fuente_nueva = "Helvetica"
scount = ActivePresentation.Slides.Count
For j = 1 To scount
fcount = ActivePresentation.Slides(j).Shapes.Count
For k = 1 To fcount
ActivePresentation.Slides(j).Shapes(k).TextFrame.TextRange.Font.Name =
fuente_nueva
End If
End If
' tablas
If ActivePresentation.Slides(j).Shapes(k).HasTable =
True Then
For sh = 1 To fcount
ColCount =
ActivePresentation.Slides(j).Shapes(k).Table.Columns.Count
RowCount =
ActivePresentation.Slides(j).Shapes(k).Table.Rows.Count
If
ActivePresentation.Slides(j).Shapes(k).Table.Cell(filas,
columnas).Shape.TextFrame.TextRange.Font.Name = fuente_vieja Then
ActivePresentation.Slides(j).Shapes(k).Table.Cell(filas,
columnas).Shape.TextFrame.TextRange.Font.Name = fuente_nueva
End If
Next
Next
Next
End If
Next k
Next j
End Sub
Sub ColorFontizer()
Dim ColCount As Integer
Dim RowCount As Integer
Dim sh As Integer
Dim filas, columnas As Integer
Dim idioma As String
scount = ActivePresentation.Slides.Count
For j = 1 To scount
fcount = ActivePresentation.Slides(j).Shapes.Count
For k = 1 To fcount
ActivePresentation.Slides(j).Shapes(k).TextFrame.TextRange.Font.Color.
RGB = colorfuente
End If
' tablas
If ActivePresentation.Slides(j).Shapes(k).HasTable =
True Then
For sh = 1 To fcount
ColCount =
ActivePresentation.Slides(j).Shapes(k).Table.Columns.Count
RowCount =
ActivePresentation.Slides(j).Shapes(k).Table.Rows.Count
ActivePresentation.Slides(j).Shapes(k).Table.Cell(filas,
columnas).Shape.TextFrame.TextRange.Font.Color.RGB = colorfuente
Next
Next
Next
End If
Next k
Next j
Índice de la presentación
Si quieres hacer una slide con los títulos del resto de slides, esta macro te
ahorrará el tedioso trabajo de revisarlas una por una, y además te genera un
enlace directo a cada slide.
----------------------------------------------------------------------
----------
' Hace una slide en la que te pone un índice con sus enlaces
'
----------------------------------------------------------------------
----------
Sub AgendaLinks()
ActivePresentation.Slides.Add 1, ppLayoutText
With ActivePresentation.Slides(1)
.Shapes(1).TextFrame.TextRange = "Índice"
Set oAgenda = .Shapes(2).TextFrame.TextRange
End With
oAgenda = ""
Next oSld
End Sub
'
----------------------------------------------------------------------
----------
' Hace una slide en la que pone todo el texto de la powerpoint
'
----------------------------------------------------------------------
----------
Sub Resumen()
ActivePresentation.Slides.Add 1, ppLayoutText
With ActivePresentation.Slides(1)
.Shapes(1).TextFrame.TextRange = ""
Set oAgenda = .Shapes(2).TextFrame.TextRange
End With
oAgenda = ""
scount = ActivePresentation.Slides.Count
For j = 1 To scount
fcount = ActivePresentation.Slides(j).Shapes.Count
For k = 1 To fcount
If ActivePresentation.Slides(j).Shapes(k).HasTextFrame
Then
oAgenda = oAgenda &
ActivePresentation.Slides(j).Shapes(k).TextFrame.TextRange.Text &
Chr(13)
End If
Next k
Next j
End Sub
'tamaño de la página
ancho = Application.ActivePresentation.PageSetup.SlideWidth
For j = 1 To scount
ActivePresentation.Slides(j).Shapes("_barra_progreso").Width =
minimo * j
Next j
End Sub
Nota adicional
Ojo a lo disfuncional que es que un usuario tenga que programar estas
funcionalidades, que debería traer el programa por sí mismo o mediante
sencillos plug-ins (tipo WordPress).