## DocumentBuilder.InsertForms2OleControl method

Insatser[`Forms2OleControl`](../../../aspose.words.drawing.ole/forms2olecontrol/) objekt till aktuell position.

```csharp
public Shape InsertForms2OleControl(Forms2OleControl forms2OleControl)
```

### Returvärde

[`Shape`](../../../aspose.words.drawing/shape/) objekt som innehåller godkänt[`Forms2OleControl`](../../../aspose.words.drawing.ole/forms2olecontrol/)

## Exempel

Visar hur man infogar ActiveX-kontroll.

```csharp
DocumentBuilder builder = new DocumentBuilder();

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

### Se även

* property [OleFormat](../../../aspose.words.drawing/shape/oleformat/)
* property [OleControl](../../../aspose.words.drawing/oleformat/olecontrol/)
* class [Shape](../../../aspose.words.drawing/shape/)
* class [Forms2OleControl](../../../aspose.words.drawing.ole/forms2olecontrol/)
* class [DocumentBuilder](../)
* namnutrymme [Aspose.Words](../../../aspose.words/)
* hopsättning [Aspose.Words](../../../)
