J
JsJ_Slim
Hi,
First and foremost, I'm actually using C#, however, I'm fine with vba
code/solution. All I need is a nudge in the right direction.
What I currently have is some code that automatically generates a table in a
content control (using the contentControl.Range.ConvertToTable() function).
However, what I want to do now is to add some text *above* the table within
the same content control, eg a title.
I've tried various methods that I can think of, and none of them worked:
* before calling Range.ConvertToTable, add the text at the front of the
string, followed by a new line. (Result: Becomes the first row of the table)
* after calling Range.ConvertToTable, attempted to add text in front the
Range.Text. (Result: Exception - The range cannot be deleted).
By the way, I'm not looking for ways to add text into the table as a title.
I can already do that by merging the cells in the first row, setting it as a
header row, and aligning everything to the center, but that's not what I
want.
Please help!
Thanks!
First and foremost, I'm actually using C#, however, I'm fine with vba
code/solution. All I need is a nudge in the right direction.
What I currently have is some code that automatically generates a table in a
content control (using the contentControl.Range.ConvertToTable() function).
However, what I want to do now is to add some text *above* the table within
the same content control, eg a title.
I've tried various methods that I can think of, and none of them worked:
* before calling Range.ConvertToTable, add the text at the front of the
string, followed by a new line. (Result: Becomes the first row of the table)
* after calling Range.ConvertToTable, attempted to add text in front the
Range.Text. (Result: Exception - The range cannot be deleted).
By the way, I'm not looking for ways to add text into the table as a title.
I can already do that by merging the cells in the first row, setting it as a
header row, and aligning everything to the center, but that's not what I
want.
Please help!
Thanks!