Sign in to follow this  
Followers 0
dannydy

winwait excel open file window to active

6 posts in this topic

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.

Share this post


Link to post
Share on other sites



Is working for me!

Are you sure that the title is correct for your version of Office?

Also look at _ExcelBookOpen were you can pass the file that you want to open.

#include <Excel.au3>
local $oExcelopen = _ExcelBookNew()
 winwaitactive("Microsoft Excel - Book1")
 Send("{LALT}")

 Send("f")
 Send("o")

Share this post


Link to post
Share on other sites

yeah...now is working for me as well.

Share this post


Link to post
Share on other sites

my next question is... when i open the excel file's FileOpenDialog

How do i winwaitactive the until the Open Dialog window is active?

Share this post


Link to post
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.


Share this post


Link to post
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.

Share this post


Link to post
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
Sign in to follow this  
Followers 0