tv69 Posted May 2, 2014 Share Posted May 2, 2014 Hello everyone, I'm new to the world of Autoit and I'm finding code examples for what I'm trying to do. I'm using the following code I found online to open a word document. #include <word.au3> $oWord = _Word_Create() Global $sDoc = "....path...docx" $oDoc = _Word_DocOpen($oWord, $sDoc) ConsoleWrite(@error & @LF) It works just fine to open the document however the document uses MS Word Mailings to fetch information from an Excel file. Using this script does not bring up the pop up when the MS Word file is opened which tries to connect to the data in the Excel file by running an SQL command which you are asked yes or no to run. I tried to attach a jpg of the popup but had a hard time finding how. Can someone please be so kind as to give me a bit of help? Thank you, TV Link to comment Share on other sites More sharing options...
water Posted May 3, 2014 Share Posted May 3, 2014 What's the value of property DisplayAlerts aftert the document has been opened? MsgBox(0, "", $oWord.DisplayAlerts) My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
tv69 Posted May 5, 2014 Author Share Posted May 5, 2014 Hi water, I added your line of code and it returned "0" in the msgbox. I suppose DisplayAlerts needs to be turned on? How would that be done? Thanks for your help. TV Link to comment Share on other sites More sharing options...
water Posted May 5, 2014 Share Posted May 5, 2014 Unfortunately I have never used MS Word Mailing. Seems we need to tell Word to not supress messages. I will investigate when I return to my office (end of the week). My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki 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