Hello,
I've downloaded the trial version of the Essential Presentation product, I have a requirement to add a (potentially many) Table(s) to the Notes section of a PowerPoint document. I'm very new to editing MS PowerPoint documents programmatically.
I've attempted to follow the Notes_2017 sample, it adds a chart not a table, but seemed close to what I need to do.
Everything seems to work, I add some text to the Notes section and that shows up, but the table only shows up in Notes Page View. Also, its coordinates origin seem to be in the corner of the slide itself not the Notes Page.
Questions:
How do I get the table to show up in the Notes section in Presentation view?
Why does the table's coordinates origin seem to be in the slide and not the Notes?
How can I adjust the font size in the Notes section, both the text portion and in the table? I've looked around at the API available to be but don't see anything that looks like it will allow me to adjust the font size, color, etc.
Here is what I believe to be the relevant part of the code:
ISlide slide2 = pres.Slides[1];
INotesSlide notesSlide = slide2.AddNotesSlide();
notesSlide.NotesTextBody.Paragraphs.Clear();
ITextPart notesTextPart = notesSlide.NotesTextBody.Paragraphs[0].TextParts.Add();
notesTextPart.Text = "Some note text here for testing";
ITable table = notesSlide.Shapes.AddTable(5, 8, 4.4 * 88, 5.6 * 88, 8.63 * 88, 5.4 * 88);
table.BuiltInStyle = BuiltInTableStyle.MediumStyle2;
table.HasBandedRows = true;
table.Hidden = false;table.HasHeaderRow = true;table.Title = "Pilot Table"; IColumns columns = table.Columns;
columns[0].Width = 0.94 * 88;
columns[1].Width = 0.46 * 88;
columns[2].Width = 1.18 * 88;
columns[3].Width = 3.54 * 88;
columns[4].Width = 1.18 * 88;
columns[5].Width = 0.28 * 88;
columns[6].Width = 0.42 * 88;
columns[7].Width = 0.63 * 88;
IRows rows = table.Rows;
bool topRow = true;
foreach (IRow row in rows){
row.Height = 28;
if (topRow)
{
AddHeaders(row);
topRow = false;
}
else
{
AddRowData(row, columns);
}
}
Thank you