Jump to content

winwait excel open file window to active


dannydy
 Share

Recommended Posts

Hi need some helps here.

i was stunk in this coding, i wanted to use winwaitactive to wait for the excel file open window to active instead of using sleep

local $oExcelopen = _ExcelBookNew()

winwaitactive("Microsoft Excel - Book1")

Send("{LALT}")

Send("f")

Send("o")

winwaitclose(FileOpenDialog)

open a new excel and go to file, open a new one, appreaciate if anyone can help.

Link to comment
Share on other sites

Maybe if you explain 'n bit more what you want to do it'll help?

If you just want to open the excel file with a fileopendialog the you don't have to first open an Excel session.

You can call the file and the do an @error check to see if all is good.

Orherwise use the _ExcelBookOpen option to open you file. Within that it'll check if the Excel object exist and if the file exist.

Link to comment
Share on other sites

Thanks for the advise.

the reason being is because i need to open an excel from sharepoint. i had tried to use _excelBookOpen option but failed to do that...

therefore i use this method to open the excel from sharepoint.

local $oExcelopen = _ExcelBookNew()

winwaitactive("Microsoft Excel - Book1")

Send("{LALT}")

Send("f")

Send("o")

sleep (1200)

send("My Share Point url")

i tried on other machine, the fileopendialog open(it takes some times to open) before it could send my Share Ponit Url. thus for the effectiveness i wanna to replace the sleep with winwaitactive to handle it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...