Friday 30 January 2015

Microsoft Office Word 2007 añadir una macro

Ver este artículo:  https://support.office.com/es-ar/article/Escribir-o-grabar-una-macro-cd56fb86-d8b2-475c-ba39-9728389feeeb


Y en el lugar de la macro poner este programa y asignarlo a un botón como se explica en el artículo...


Sub resaltar_lineas()
'
' resaltar_lineas Macro
' Macro grabada el 29/06/2014 por Paloma
'
' ref: https://wiki.brown.edu/confluence/pages/viewpage.action?pageId=4429
    Options.DefaultHighlightColorIndex = wdYellow
    Do
        Selection.EndKey Unit:=wdLine, Extend:=wdExtend
        Selection.Range.HighlightColorIndex = wdYellow
        Selection.MoveRight Unit:=wdCharacter, Count:=1
        If Selection.MoveDown(Unit:=wdLine, Count:=1) <> 1 Then
            Exit Do
        End If
    Loop

End Sub

No comments:

Post a Comment