View Single Post
 
Old 06-25-2021, 09:35 AM
eduzs eduzs is offline Windows 10 Office 2019
Expert
 
Join Date: May 2017
Posts: 266
eduzs is on a distinguished road
Default

Thanks Guessed, works fine!
I also did this using select.

Code:
Dim oTbl As Table
Set oTbl = ActiveDocument.Tables(1)
With oTbl
    .Range.Columns(2).Select
    Selection.ParagraphFormat.Alignment = wdAlignParagraphLeft
    .Cell(1, 2).Select
    Selection.Range.ParagraphFormat.Alignment = wdAlignParagraphCenter
End With
Set oTbl = Nothing
Just another question, is there a way to set a range of vertical cells from the start cell to the end cell, instead of one left to right and top to bottom?

Code:
Set oRng = ActiveDocument.Range(Start:=oTbl.Cell(2, 2).Range.Start, End:=oTbl.Cell(5, 2).Range.End)
__________________
Backup your original file before doing any modification.
Reply With Quote