![]() |
|
#1
|
||||
|
||||
![]() Hi Jennifer, You can't have option 3. That aside, try: Code:
Sub Borders() Application.ScreenUpdating = False Dim i As Long With Selection.Sections(1) If .Borders(wdBorderLeft).LineStyle = wdLineStyleNone Then For i = 1 To 4 With .Borders(i) .LineStyle = wdLineStyleSingle .LineWidth = wdLineWidth025pt .Color = wdColorAutomatic End With Next With .Borders .DistanceFrom = wdBorderDistanceFromText .DistanceFromTop = 1 .DistanceFromLeft = 1 .DistanceFromBottom = 1 .DistanceFromRight = 1 End With ElseIf .Borders.DistanceFrom = wdBorderDistanceFromText Then With .Borders .DistanceFrom = wdBorderDistanceFromPageEdge .DistanceFromTop = 24 .DistanceFromLeft = 24 .DistanceFromBottom = 24 .DistanceFromRight = 24 End With Else .Borders(wdBorderLeft).LineStyle = wdLineStyleNone .Borders(wdBorderRight).LineStyle = wdLineStyleNone .Borders(wdBorderTop).LineStyle = wdLineStyleNone .Borders(wdBorderBottom).LineStyle = wdLineStyleNone End If End With Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
tenpaiman | Word | 2 | 08-08-2012 07:20 PM |
![]() |
Rose_Garden | Word | 1 | 03-31-2012 04:50 AM |
Macro to insert new page... | samanthaj | Word | 17 | 01-31-2012 01:53 PM |
Page borders vs Orientation | Ineedcoffee | Word | 5 | 12-06-2011 12:52 PM |
![]() |
kimsi | Word | 3 | 11-15-2011 11:54 PM |