Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I have project with hundreds of schedules created with the rows in the headers.
I would like to use the following code to change the font of each of the cells in the headers.
For intHeaderRow As Integer = 0 To intScheduleRowColumnCountHeaderRows For intHeaderColumn As Integer = 0 To intScheduleRowColumnCountHeaderColumns Dim objTableCellStyle As TableCellStyle = objTableSectionData.GetTableCellStyle(intHeaderRow, intHeaderColumn) If Not objTableCellStyle.FontName.Equals(strNewFontName) Then If objTableSectionData.AllowOverrideCellStyle(intHeaderRow, intHeaderColumn) Then 'Dim tcs As TableCellStyle = New TableCellStyle() Dim options As TableCellStyleOverrideOptions = New TableCellStyleOverrideOptions With { .FontSize = False } objTableCellStyle.FontName = strNewFontName objTableCellStyle.SetCellStyleOverrideOptions(options) objTableSectionData.SetCellStyle(intHeaderRow, intHeaderColumn, objTableCellStyle) End If End If Next Next
This code works well & changes the font, however it does not preserve the size or the boldness of the cell.
The size gets changed to the same as what is set in the schedule appearance header text.
Any ideas?
Kind Regards
David
Solved! Go to Solution.