Hi, In my application I've changed the setting so that the powerpoint would be opened without file download prompt.
Now I need to focus on that already opened powerpoint and do some testing through ruby.( say count the no of slides) earlier i was saving the powerpoint ( clicking the save button from that file download prompt) and opening the same ppt as ppt = WIN32OLE.new('PowerPoint.Application') ppt.Visible = true * **doc = ppt.Presentations.Open('C:\Documents and Settings\sinhaa\My Documents\JHEPAT_2010_VOL51_PG845.ppt')* slidecount = doc.Slides.Count puts slidecount but the problem happend that when the remote system ( build server) is locked or minimised then it stuck in the file download prompt because it was not sending the key stroke. So after setting changed the ppt already opened so i should be able to directly count the slides on that ppt by focusing or activating the same ppt. i tried with below code but it seems not working. any thoughts??? $ie.goto(" http://www.thelancet.com/journals/lancet/article/PIIS0140-6736%2810%2960523-5/fulltext ") $ie.link(:text, "Download to PowerPoint").click ###The ppt gets opened automatically as a separate ppt file without file download prompt because settings changed. ppt = WIN32OLE.new('PowerPoint.Application') ppt.Visible = true slidecount = * ppt.Presentations*.Slides.Count puts slidecount Regards Arihan -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe, reply using "remove me" as the subject.