View Single Post
 
Old 04-23-2024, 03:54 AM
anmalogo anmalogo is offline Windows 11 Office 2021
Novice
 
Join Date: Apr 2024
Posts: 8
anmalogo is on a distinguished road
Default

Quote:
Originally Posted by vivka View Post
Hi! This will do the job on the selected tables:
Code:
Sub Format_Tables()
'
    For Each tbl In selection.Tables
        With tbl.range
            .Font.name = "Segoe UI"
            .Font.Color = RGB(0, 0, 0) 'Black color
             .Font.Size = 8
            .Cells.VerticalAlignment = wdCellAlignVerticalCenter
         End With
    Next tbl
End Sub
Hello Vivka,

Thanks for your quick response, but your code is changing the whole table, not just the selected cell of the table . Do you know how to apply the code just to the selected cells of the table?. My table is quite big.

Thanks.
Reply With Quote