I'm on the right track I think, but does anyone know how to set the text in a cell in a table on a powerpoint slide? This is what I'm doing...
PpApp = gcnew PowerPoint::Application();
PpApp->Visible = MsoTriState::msoTrue;
PowerPoint::Presentations ^PpPresSet = PpApp->Presentations;
String ^val = WorkingDirectory + "\\wiips.pot";
PowerPoint::Presentation ^PpPres = PpPresSet->Open(val,
soTriState::msoFalse, MsoTriState::msoTrue, MsoTriState::msoTrue);
PowerPoint::Slides^ PpSlides = PpPres->Slides;
PowerPoint::Slide ^PpSlideImg = PpSlides->Add(1, PowerPoint::PpSlideLayout::ppLayoutBlank);
PowerPoint::Slide ^PpSlideTbl = PpSlides->Add(2, PowerPoint::PpSlideLayout::ppLayoutBlank);
//get picture parameters
int width = 0;
int height = 0;
GetPptPicSize(filename, &width, &height);
PpSlideImg->Shapes->AddPicture(filename, MsoTriState::msoFalse,
MsoTriState::msoTrue,
(float)(MAX_WIDTH + 20 - width)/2, (float)(MAX_HEIGHT + 20 - height)/2,
(float)width, (float)height);
PowerPoint::Shape ^tbl =
PpSlideTbl->Shapes->AddTable(CsvDs->Tables[0]->Rows->Count+1,
CsvDs->Tables[0]->Columns->Count, 10, 10, MAX_WIDTH, MAX_HEIGHT);
tbl->Table->Cell(1,1)->Shape->TextFrame->TextRange->Text = "hello";
The problem is that for some reason C++ .NET in VS2008 doesn't have a member
Text in the TextRange property. All the documentation says it does. What
gives? Thanks.
Vinoj