Using powershell able add text in the table cell like this, now I want to format the cell text.
table.Cell(1, 1).Range.Text = "ListvItem1
vitem2"
eg. I want to bold and align center "List" string. apply ordered item style for Item1 and Iteam2 string. How can I do this using powershell?
Edit: found this code in C#, not able to make it work in powershell.
//boldrange_1 for "green", boldrange_2 for "inch".
Word.Range boldrange_1 = table.Cell(1, 2).Range;//Assign the whole cell range to boldrange, then adjust it with SetRange method.
boldrange_1.SetRange(table.Cell(1, 2).Range.Start, table.Cell(1, 2).Range.Words[1].End);
boldrange_1.Bold= 1;
Word.Range boldrange_2 = table.Cell(2, 2).Range;
boldrange_2.SetRange(table.Cell(2, 2).Range.Words[4].End, table.Cell(2, 2).Range.Words[5].End);
boldrange_2.Font.Bold = 1;
//I've found that boldrange_2.Font.Bold = 1; and boldrange_2.Bold = 1; have the same effect.