Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents from any .NET(C#, VB.NET, ASP.NET, .NET Core) application and Java (J2SE and J2EE) application.

Fri May 13, 2016 1:52 pm

Need VB code for creating header and text boxes in slide + Inserting text in each of these boxes.
Also need to leave the textboxes without a border line / no color border line.

Thanks a lot!

kdr13
 
Posts: 71
Joined: Fri Apr 15, 2016 4:35 pm

Mon May 16, 2016 8:46 am

Hi,

Thanks for your posting.
Sorry that we don't support to add header and textboxes. But a rectangle shape has nearly same functions as textbox, I recommand you to use rectangle shapes if you can.
Sharing some code to add rectangle shape:
Code: Select all
 Dim shape As IAutoShape = presentation.Slides(0).Shapes.AppendShape(ShapeType.Rectangle, New RectangleF(10, 10, 200, 100))

shape.Fill.FillType = FillFormatType.Solid
shape.Fill.SolidColor.Color = Color.White
shape.ShapeStyle.LineColor.Color = Color.White

shape.AppendTextFrame("Demo of Spire.Presentation")
Dim textRange As TextRange = shape.TextFrame.TextRange
textRange.Fill.FillType = Spire.Presentation.Drawing.FillFormatType.Solid
textRange.Fill.SolidColor.Color = Color.Black



Please feel free to contact us if you need further assistance.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2444
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.Presentation