View Single Post
 
Old 03-29-2023, 03:19 PM
Cendrinne's Avatar
Cendrinne Cendrinne is offline Windows 10 Office 2019
Competent Performer
 
Join Date: Aug 2019
Location: Montreal Quebec Canada
Posts: 200
Cendrinne is on a distinguished road
Default Help, Remove all tables borders As of here, don't work

I've tried to remove all the tables borders, as of this point with a range, and odd, It doesn't work.
I wish to keep the tables borders before my selection. I thought a selection of Tables range would only affect those table.

Anyway, here is my script, but it touches ALL TABLES

Here is the script I've created:
HTML Code:
    Dim xTbl As Table, oRng As Range
 
      Application.ScreenUpdating = False
    
        For Each xTbl In ActiveDocument.Range.Tables
           Set oRng = ActiveDocument.Range(Selection.Range.Start, ActiveDocument.Range.End)
     
    With xTbl.Borders

      xTbl.Borders.InsideLineStyle = wdLineStyleNone
      xTbl.Borders.OutsideLineStyle = wdLineStyleNone
    End With

    Next

  Application.ScreenUpdating = True
What am I doing wrong?
or it's not doable.

Please any insights would be greatly appreciated

C

Last edited by Cendrinne; 03-30-2023 at 12:42 AM. Reason: added precision and corr typos.
Reply With Quote