I want to run a vba macro that has IRibbonControl as a parameter using Python win32com.
For example, my vba sub is looks like below
Public Sub test(control As IRibbonControl)
blabla
End Sub
And
And then Python calls test sub using win32com.
What should we put on parameters of a test function?
import os
import win32com.client
from win32com.client import DispatchEx
xl = DispatchEx('Excel.Application')
xl.Workbooks.Open("myexcelfile.xlsm")
xl.Application.Run("test", some magic needs here)