I'm trying to copy a table from an existing Excel workbook with formatting and send it as an email. However I'm running into an issue, because the table shows the ActiveX controls initialization popup and I'm unable to select any cells: Can anyone share some wisdom on how I can open the workbook AND accept the warning, as I'm not very familiar with the COM stuff? So far I've got just the basics, cause I want to clear this issue first:
Code: Select all
#s::
Path := "my path here" ; Path to table
xl := ComObjCreate("Excel.Application") ; Opens Excel
xl.visible := true
xl.Workbooks.open(Path) ; Opens the table
xl.Range("B2","R56").Copy ; copy the required table
MsgBox, % Clipboard ; to check what has been copied
I'd really appreciate any help or knowledge thrown at me.
Thanks in advance.