Skip to content

Set Cell Style Activity

The Set Cell Style activity formats the style of a table cell within a Microsoft Word document. This activity enhances the visual appearance of cells, improving text readability and overall document presentation.

Field Description Requirement
Word Name The reference name of the Microsoft Word file to be opened or already active. Required
Table Index The 1-based index of the target table within the Word document. Required
Range The specific range of cells (e.g., A1, A1:B5) within the table to apply the style changes. Optional
Fill Color The background color of the cell, specified as RGB values (e.g., 255,0,0) or a standard color name (e.g., Red). Optional
Font Color The text color within the cell, specified as RGB values (e.g., 255,0,0) or a standard color name (e.g., Red). Optional
Bold A boolean value indicating whether the font should be bold. Optional
Italic A boolean value indicating whether the font should be italicized. Optional
Underline A boolean value indicating whether the text should be underlined. Optional
Font Size The desired font size for the text within the cell. Optional
Font Name The name of the font to apply (e.g., Arial, Calibri). Optional
Has Border A boolean value indicating whether borders should be applied to the cell. Optional
Border Style The style of the border (e.g., NONE, THIN, DASHED). Optional
Border Position The position of the border to apply (e.g., ALL, TOP, LEFT). Optional
Border Color The color of the border, specified as RGB values or a standard color name. Optional
Vertical Alignment The vertical alignment of content within the cell (e.g., NONE, TOP, CENTER). Optional
Horizontal Alignment The horizontal alignment of content within the cell (e.g., NONE, LEFT, CENTER). Optional
Is Hyperlink A boolean value indicating whether the cell content should be converted to a hyperlink. Optional
URL The URL value to be used if Is Hyperlink is set to true. Optional

Action Types & Examples

Word Name

  • Format: string
  • Example Result: newWord

Table Index

  • Format: digit
  • Example Result: 3

Range

  • Format: string
  • Example Result: A1 or A1:B5

Font Color

  • Format: string (RGB or name)
  • Example Result: 255,0,0 or Red

Font Size

  • Format: digit
  • Example Result: 9

Font Name

  • Format: string
  • Example Result: Arial

Border Style

  • Format: string (enum value)
  • Example Result: THIN or DASHED

Border Position

  • Format: string (enum value)
  • Example Result: ALL or TOP

Border Color

  • Format: string (RGB or name)
  • Example Result: yellow or 255,56,180

Vertical Alignment

  • Format: string (enum value)
  • Example Result: TOP or CENTER

Horizontal Alignment

  • Format: string (enum value)
  • Example Result: LEFT or CENTER

Implementation Examples

Field Setup - Word Name: myDocument - Table Index: 1 - Range: B2:D4 - Font Size: 11 - Font Name: Verdana - Font Color: 0,0,255 (Blue) - Bold: true - Fill Color: 255,255,0 (Yellow) - Has Border: true - Border Style: THICK - Border Position: ALL - Border Color: 0,0,0 (Black) - Horizontal Alignment: CENTER - Vertical Alignment: CENTER

Execution Parameters - SetCellStyle(WordName: "myDocument", TableIndex: 1, Range: "B2:D4", FillColor: "255,255,0", FontColor: "0,0,255", Bold: true, FontName: "Verdana", FontSize: 11, HasBorder: true, BorderStyle: "THICK", BorderPosition: "ALL", BorderColor: "0,0,0", HorizontalAlignment: "CENTER", VerticalAlignment: "CENTER")

Technical Notes

Ensure the specified Word document is open or accessible. Table indices are 1-based. RGB color values should be provided as comma-separated integers (e.g., 255,0,0). When using Is Hyperlink, both Is Hyperlink and URL must be configured. Enum values for Border Style, Border Position, Vertical Alignment, and Horizontal Alignment are case-sensitive.