locked
For Microsoft office interop services - Shape MsoAutoShapeType.msoShapeRectangle Property MsoAutoSize.msoAutoSizeTextToFitShape is set but not reflected in slide RRS feed

  • Question

  • Hi Team,

    I am trying to set the Microsoft office interop services - Shape MsoAutoShapeType.msoShapeRectangle Property  MsoAutoSize.msoAutoSizeTextToFitShape is set but not reflected in slide.

    Please advise.

    Code is as below:

      foreach (Slide slide in pptPresentation.Slides)
                {
                    //GetAllShapes(slide.Shapes, ref shapes);
                    foreach (Microsoft.Office.Interop.PowerPoint.Shape shape in slide.Shapes)
                    {

                        if (shape.AutoShapeType.Equals(MsoAutoShapeType.msoShapeRectangle))
                        {
                            shape.TextFrame2.AutoSize = MsoAutoSize.msoAutoSizeTextToFitShape;
                        }
                    }
                }

                //pptPresentation.Save();
                pptPresentation.SaveCopyAs(path+"Copy of " + file_pptx,
                              Microsoft.Office.Interop.PowerPoint.PpSaveAsFileType.ppSaveAsDefault,
                              MsoTriState.msoTrue);

    Regards,

    Vishal Supekar


    Regards, Vishal Supekar BE.CSE MCPDEA(Micorsoft Certified)


    Regards, Vishal Supekar BE.CSE MCPDEA(Micorsoft Certified)

    Tuesday, December 22, 2020 8:03 AM

All replies

  • Please advise

    Regards, Vishal Supekar BE.CSE MCPDEA(Micorsoft Certified)

    Thursday, December 24, 2020 4:29 AM