InsertForms2OleControl

DocumentBuilder.InsertForms2OleControl method

插入Forms2OleControl对象进入当前位置。

public Shape InsertForms2OleControl(Forms2OleControl forms2OleControl)

返回值

Shape包含传递的对象Forms2OleControl

例子

展示如何插入 ActiveX 控件。

DocumentBuilder builder = new DocumentBuilder();

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

也可以看看