presentation.LoadFromFile("D:\1\abc.potx")
Dim iSile = presentation.Slides.Count
Dim oSlide = presentation.Slides(0)
Dim oShape = oSlide.Shapes(0)
How can dupplicate object [oShape] to process?
Dim presentation As New Presentation()
presentation.LoadFromFile("C:\Users\Administrator\Desktop\test.pptx")
Dim oSlide = presentation.Slides(0)
Dim oShape = TryCast(oSlide.Shapes(0), IAutoShape)
Dim st As ShapeType = oShape.ShapeType
Dim newSlide = presentation.Slides.Append()
'step1. copy the shape to the second slide, pay attention there's no format
Dim newShape As IAutoShape = newSlide.Shapes.AppendShape(st, New RectangleF(50, 50, oShape.Width, oShape.Height))
'step2. add the format to the shape
'copy the fill color
newShape.Fill.FillType = oShape.Fill.FillType
newShape.Fill.SolidColor.Color = oShape.Fill.SolidColor.Color
'copy the line color
newShape.Line.FillFormat.FillType = oShape.Line.FillFormat.FillType
newShape.Line.FillFormat.SolidFillColor.Color = oShape.Line.FillFormat.SolidFillColor.Color
'copy the text content
newShape.TextFrame.Text = oShape.TextFrame.Text
'copy the text color and text font
newShape.TextFrame.TextRange.Format.Fill.FillType = oShape.TextFrame.TextRange.Format.Fill.FillType
newShape.TextFrame.TextRange.Format.Fill.SolidColor.Color = oShape.TextFrame.TextRange.Format.Fill.SolidColor.Color
newShape.TextFrame.TextRange.LatinFont = oShape.TextFrame.TextRange.LatinFont
'copy the text font size
newShape.TextFrame.TextRange.FontHeight = oShape.TextFrame.TextRange.FontHeight
presentation.SaveToFile("11100.pptx", FileFormat.Pptx2010)