aiter Posted August 12, 2016 Share Posted August 12, 2016 I cannot get the method movestart to work in my program $oRange = _Word_DocFind($oDoc, "3 4") ; return a range $oRange.MoveStart($WdLine,-1) ; supposed to move the start range to the beginning of the line I get an error '... requested action with this object has failed.' I have seen this statement used in Word.Udf, but cannot see why my statement is failing. Help appreciated. Link to comment Share on other sites More sharing options...
aiter Posted August 12, 2016 Author Share Posted August 12, 2016 This works $myrange.MoveStart($WdParagraph,-1) Question is why is $WdLine failing then? Also how do I trap errors like these. Pity there is no Try...Catch in Autoit Link to comment Share on other sites More sharing options...
water Posted August 12, 2016 Share Posted August 12, 2016 Which version of AutoIt do you run? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
aiter Posted August 12, 2016 Author Share Posted August 12, 2016 (edited) 3.3.14.2 That is what the @AutoItVersion variable is returning. Is this the right way to look up the version? Edited August 12, 2016 by aiter Link to comment Share on other sites More sharing options...
water Posted August 12, 2016 Share Posted August 12, 2016 Correct. You need to add a COM error handler as this version of AutoIt crashes when a COM error occurs and there is no COM error handler. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
aiter Posted August 12, 2016 Author Share Posted August 12, 2016 This is what I need, but no idea on how to do it yet. I would appreciate a link or example on how to do this, if its not too much trouble. Link to comment Share on other sites More sharing options...
water Posted August 12, 2016 Share Posted August 12, 2016 Sorry, missed to mention where to find further information. Please check the help file for ObjEvent. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
aiter Posted August 12, 2016 Author Share Posted August 12, 2016 Sweet, I will look into it. Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now