insert_forms_2_ole_control method
insert_forms_2_ole_control(forms_2_ole_control)
Inserts Forms2OleControl object into current position.
def insert_forms_2_ole_control(self, forms_2_ole_control: aspose.words.drawing.ole.Forms2OleControl):
...
Parameter | Type | Description |
---|---|---|
forms_2_ole_control | Forms2OleControl |
Returns
Shape object that contains passed Forms2OleControl
Examples
Shows how to insert ActiveX control.
builder = aw.DocumentBuilder()
button1 = aw.drawing.ole.CommandButtonControl()
shape = builder.insert_forms_2_ole_control(button1)
self.assertEqual(aw.drawing.ole.Forms2OleControlType.COMMAND_BUTTON, shape.ole_format.ole_control.as_forms2_ole_control().type)
See Also
- module aspose.words
- class DocumentBuilder
- property Shape.ole_format
- property OleFormat.ole_control