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):
    ...
ParameterTypeDescription
forms_2_ole_controlForms2OleControl

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