jueves, 1 de marzo de 2018

WORD: Macros 1

MODIFICA LA LETRA, SEGÚN INDIQUES
Sub for1()
' Cambiar tamaño de la fuente
Selection.Font.Size = 20
' Cambiar el tipo de fuente
Selection.Font.Name = "Britannic Bold"
' Poner texto en negrita
Selection.Font.Bold = wdToggle
' Poner texto en italic
Selection.Font.Italic = wdToggle
' Darle el color rojo
Selection.Font.Color = wdColorRed
End Sub


PARA ALINEAR UN TEXTO, PUEDES USAR

' Alinear texto a la izquierda:
Selection.ParagraphFormat.Alignment = wdAlignParagraphLeft
' Alinear texto a la derecha:
Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
' Centrar texto:
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
' Texto justificado completo
Selection.ParagraphFormat.Alignment = wdAlignParagraphJustify

Para seleccionar todo el texto usa:
Selection.WholeStory

PARA IMPRIMIR TODOS LOS DOCUMENTOS ABIERTOS

Sub ImprimirTodo()
Dim doc As Document
For Each doc In Documents
doc.PrintOut
Next doc
End Sub

PARA HACER VISTA PREVIA DE IMPRESIÓN AL 100%

Sub ImpPrevia()
ActiveDocument.PrintPreview
ActiveWindow.View.Zoom = 100
End Sub

No hay comentarios.:

Publicar un comentario