OleObjectFrameEx TextFrameEx

hi team,

OleObjectFrameEx format ShapeEx, how to modify the inside TextFrameEx, please tell

Hi Shiny,


I have tred to understand the requirements shared by you and unfortunately have not been able to understand them. Can you please share the complete details about your requirements and may also share the sample code and source presentatioan. I will try my best to help you out.

Many Thanks,
ShapeEx shape = slide.Shapes[0];
TextFrameEx textFrame = ((AutoShapeEx)shape).TextFrame;

shape type is OleObjectFrameEx,This does not translate into AutoShapeEx type,I want to modify the content of the TextFrameEx inside.Please guide us.

Hi Shiny,


It seems that you are trying to cast OleObjectFrameEx to AutoshapeEx. I regret to share that this is not possible and neither this is an issue.

Many Thanks,

I mean: my shapeEx type OleObjectFrameEx, I want to modify the text of the This ShapeEx inside, how to operate?

Hi Shiny,


Please share the sample presentation and highlight the text that you want to change or access. I will try my best to help you further.

Many Thanks,

I uploaded my presentation files, and highlight the text, please guide

Hi Shiny,


Thanks for sharing the presentation file. Can you please share the snapshot of the desired text to be extracted from them Ole frame as I am unable to find the highlighted text.

Many Thanks,
For example: $ ShowStrOne $.
On the first page inside.
I'd like to be replaced with other text. Please give a code example.

Hi Shiny,


Please use the following sample code to serve the purpose. I have been able to access the following text using the shared code.

  • $ ShowStrOne $.
  • $ ShowStrTwo $
  • $ ShowStrThree $

public static void TestMasterSlide()
{
String path = @“D:\Aspose Data”;
PresentationEx pres = new PresentationEx(path+“Master.pptx”);
// SlideEx slide = pres.Slides[0];
foreach(SlideEx slide in pres.Slides)
{

foreach(ShapeEx shape in slide.Shapes)
{
if (shape is AutoShapeEx)
{
AutoShapeEx ashp = (AutoShapeEx)shape;

TextFrameEx text = ashp.TextFrame;

String Text = text.Text;


}

}
}



}

Please share, if I may help you further in this regard.

Many Thanks,

Thank you very much!