How to Add a Text Box Out of the Board of Each Slide Based on VB.NET?

Hi, Support:
How to realize my this requirements by Apose.Slides.dll as below:

  1. extract all the text in the textboxes in each slide
  2. add a textbox out of the range of the slide, and set the board of the added textbox to none, and set the fillcolor of the added textbox to none, and set the width of the added textbox to 5cm, and else maybe set the added textbox invisible?
  3. add texts into the added textbox
  4. Set the fontsize of texts in the added textbox to 1 pt, and set the character space of the texts in the added textbox to 30%, and set the fontcolor of the texts in the added textbox to red or blue or else.

How to realize those features? Thanks for your help.

@ducaisoft,
Thank you for your questions. Please read Manage Text and try converting some appropriate code examples from C# to VB.NET code for your goals.

If you fail, we need more information to help you:

Do you want to extract text sequentially or all at once?

Unfortunately, I was unable to understand this requirement. Please share a presentation file with text boxes that look as expected (you can zip the file and upload it here).

Character spacing is specified in pt. What do you mean by 30%?

please refer to this demo PPT.
Test.jpg (44.7 KB)

Test.zip (43.6 KB)

@ducaisoft,
Thank you for the additional information. We will reply to you as soon as possible.

Thanks for your help!
I resolved most of the issues, but I failed to squeeze characters tightly.
I used the code:
paragraph1.ParagraphFormat.SpaceWithin = 0.1, or
paragraph1.ParagraphFormat.SpaceWithin = 1000,
but got no results.

Now, I do not know how to set the character space for the added new textbox.

@ducaisoft,
Thank you for your patience. To change the character spacing for a text, please use the following code snippet:

' The textBox below is an IAutoShape object.
textBox.TextFrame.Paragraphs(0).ParagraphFormat.DefaultPortionFormat.Spacing = -3

API Reference: IBasePortionFormat interface

Thank!
All done!

@ducaisoft,
Thank you for using Aspose.Slides.

Thanks!

Another is that whether a textbox could be cloned and moved to a new position? If so, how to work it out?

@ducaisoft,
To clone a shape and move it to a specified position, please use the following code snippet:

’ Get the first shape from the first slide.
Dim shape = presentation.Slides(0).Shapes(0)

’ Clone the shape at coordinates (100, 100).
presentation.Slides(0).Shapes.AddClone(shape, 100, 100)

Documents: Clone Shape
API Reference: IShapeCollection interface