COM Excel to Internet Explorer Data Transfer ERROR

Get help with using AutoHotkey and its commands and hotkeys
Vaklev
Posts: 47
Joined: 04 Mar 2019, 13:58
GitHub: GeorgeSmete
Contact:

COM Excel to Internet Explorer Data Transfer ERROR

Post by Vaklev » 08 May 2019, 10:14

Hey guys, I am trying to copy data from excel and paste it into a website on internet explorer using COM. I am getting an error " Operation Unavailable: my var := ComObjActive("InternetExplorer.Application)", it appears it's failing to open up the existing internet explorer window, here is my code can you please help me resolve this, also please let me know if I am copying the data from excel correctly without using the .value, I only use the .value com command when pasting the variable from excel into the IE element field. CODE BELOW:

Code: Select all

f1::

wb := ComObjCreate("InternetExplorer.Application")
wb.Visible := True

;EXCEL
xl := ComObjActive("Excel.Application") ; creates excel handle
deposit_branch := xl.ActiveCell ; selects value of deposit branch

;F2R
pwb := ComObjActive("InternetExplorer.Application")
pwb.Visible := true

location := pwb.document.getElementById("LctrPartALocationIdentifierField") ; 
location.value := deposit_branch

return

Return to “Ask For Help”