I create a Powerpoint add-in in .NET and I know how to add new textbox to the slide. But I don´t know how to add radio buttons, check buttons and input text fields. Is it possible?
private void questions()
{
PowerPoint.Shape textBox = activeSlide.Shapes.AddTextbox(Office.MsoTextOrientation.msoTextOrientationHorizontal, 50, 50, 500, 500);
textBox.TextFrame.TextRange.InsertAfter("Text");
}
Here's how you'd do it in VBA. I'll leave the VBA 2 C# translation work to you.
Dim oSl As Slide
Dim oSh As Shape
Set oSl = ActivePresentation.Slides(1)
Set oSh = oSl.Shapes.AddOLEObject(100, 100, 200, 30, "Forms.OptionButton.1")
More info: http://msdn.microsoft.com/en-us/library/office/bb230698(v=office.12).aspx
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.