Hi,
I loaded the attached presentation and replaced the portion “Product offering –” with the new one containing the same text and applied bold effect. When I saved the file and opened it in PowerPoint, I saw the bold effect didn’t get applied.
Here’s the code I use:
String path = “Immunology_panels_launch_presentation.ppt”;
Presentation presentation = new Presentation(path);
ISlide slide = presentation.getSlides().get_Item(0);
IAutoShape shape = (IAutoShape) slide.getShapes().get_Item(0);
IParagraph paragraph = shape.getTextFrame().getParagraphs().get_Item(0);
IPortionCollection portions = paragraph.getPortions();
IPortion portion = portions.get_Item(0);
IPortion newPortion = new Portion();
newPortion.getPortionFormat().setFontBold(NullableBool.True);
newPortion.setText(portion.getText());
portions.remove(portion);
portions.insert(0, newPortion);
presentation.save(
“Immunology_panels_launch_presentation-16.12.0.ppt”, SaveFormat.Ppt);
I’m using Aspose.Slides for Java 16.12.0.
Can you check this?
Thanks,
Zeljko