We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Presentation: Attempting to add a Table to the Notes section of a PowerPoint Slide, some questions

Thread ID:

Created:

Updated:

Platform:

Replies:

140784 Nov 5,2018 05:53 PM UTC Nov 7,2018 10:09 AM UTC WinForms 1
loading
Tags: Presentation
Tom Nicholas
Asked On November 5, 2018 05:53 PM UTC

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



KarthikeyanC [Syncfusion]
Replied On November 7, 2018 10:09 AM UTC

Hi Tom Nicholas, 
We have checked the code snippet and please find the details below. 
Query 
Response 
How do I get the table to show up in the Notes section in Presentation view? 
This is the behavior of PowerPoint presentation file format. The tables will not be visible in normal view.  
Why does the table's coordinates origin seem to be in the slide and not the Notes? 
This is also the behavior or PowerPoint presentation. There is no separate co-ordinate for notes view. We must follow the same as slide. 
How can I adjust the font size in the Notes section, both the text portion and in the table? 
We can format the text that we add to notes pages. Please refer the below documentation for the same. 


Please let us know if you need any further assistance in this. 
Regards, 
Karthikeyan  


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;