InsertForms2OleControl

DocumentBuilder.InsertForms2OleControl method

Inserts Forms2OleControl object into current position.

public Shape InsertForms2OleControl(Forms2OleControl forms2OleControl)

Return Value

Shape object that contains passed Forms2OleControl

Examples

Shows how to insert ActiveX control.

DocumentBuilder builder = new DocumentBuilder();

CommandButtonControl button1 = new CommandButtonControl();
Shape shape = builder.InsertForms2OleControl(button1);
Assert.AreEqual(Forms2OleControlType.CommandButton, ((Forms2OleControl)shape.OleFormat.OleControl).Type);

See Also