none
Adding border line via script. RRS feed

  • Question

  • Hello, 

    I'm trying o replace the bottom border under some paragraphs in a document with the border lines via VBA.
    The only way I know to create borderlines is by typing three minus signs followed by Enter however during macro recording this does not work.
    Is there a specific paragraph or range property I can set to create the border lines via VBA?

    Wednesday, October 31, 2018 10:15 AM

All replies

  • For example:

    Sub BottomBorder()
        With Selection.ParagraphFormat.Borders(wdBorderBottom)
            .LineStyle = wdLineStyleSingle
            .LineWidth = wdLineWidth025pt
            .Color = wdColorBlack
        End With
    End Sub


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    Wednesday, October 31, 2018 3:35 PM