Documentos de Académico
Documentos de Profesional
Documentos de Cultura
VB para Word
VB para Word
With Selection.Font
.Name = "Arial"
.Size = 10
End With
End Sub
Insertar texto
Para insertar cualquier texto predeterminado en el punto de
inserción del cursor del ratón usa:
Sub SustT()
End Sub
Sub ImprimirTodo()
doc.PrintOut
Next doc
End Sub
Sub ImpPrevia()
ActiveDocument.PrintPreview
ActiveWindow.View.Zoom = 100
End Sub
Sub ImpAllCarpeta()
sMyDir = "C:\Users\NombreDeUsuario\Desktop\Carpeta"
sDocName = Dir()
Wend
End Sub
Sub PegarTSF()
Selection.PasteSpecial _
DataType:=wdPasteText, _
Placement:=wdInLine
End
oops:
Beep
End Sub
Sub IImagen()
On Error Resume Next
Application.CommandBars.FindControl(ID:=1764).Execute
End Sub
Sub Comillas()
Selection.InsertAfter """"
Selection.InsertBefore """"
End Sub
Sub Parentesis()
Selection.InsertAfter ")"
Selection.InsertBefore "("
End Sub
Sub TeP()
bIn = False
Selection.HomeKey Unit:=wdStory
bIn = True
bIn = False
Selection.Font.Italic = wdToggle
Selection.Font.Color = wdColorBlack
End If
If bIn Then
Selection.Font.Italic = wdToggle
Selection.Font.Color = wdColorRed
End If
Next
End Sub
Dim J As Integer
With FontTable
.Borders.Enable = False
.Cell(1, 1).Range.Font.Bold = 1
.Cell(1, 2).Range.Font.Bold = 1
End With
For J = 1 To FontNames.Count
With FontTable
.Cell(J + 1, 1).Range.Font.Size = 10
.Cell(J + 1, 2).Range.Font.Size = 10
End With
Next J
FontTable.Sort SortOrder:=wdSortOrderAscending
End Sub
Insertar un comentario
Permite insertar un comentario predeterminado en el punto de
inserción o sea donde se situe el cursor del ratón en un documento.
Sustituye en el código "COMENTARIO" por lo que debe aparecer.
Sub Coment()
MyText = "COMENTARIO"
End Sub
Sub InsertCorazon()
Selection.InsertSymbol CharacterNumber:=9829, _
Font:="Arial", Unicode:=True
End Sub
End Sub
ActiveCell.Value = Now
End Sub
Sub IFecha2()
InsertAsField:=False
End Sub
Sub inicio()
Selection.GoTo What
End Sub
Sub HomeKey()
Selection.GoTo What
End Sub
Páginas relacionadas
✓ Macro de Word para crear etiquetas o hashtags para redes
sociales
✓ Como crear y grabar macros en Word y Excel, ejemplos prácticos
✓ Trucos para Microsoft Word, uso, tips, configuración, ayuda y
consejos
✓ Trucos para Microsoft Word, utilidades, curiosidades y secretos
✓ Cómo recuperar documentos perdidos que no se guardaron en
Word
✓ Como abrir, reparar y recuperar archivos y documentos dañados
de Word
✓ Como usar el diccionario de Word en otro equipo o instalación