gjenkins Posted October 1, 2009 Share Posted October 1, 2009 Using the AuotIt Window Info tool, I can not get much information about the controls in the Microsoft Office Print Dialogs/Windows (File -> Print). The tool will identify the window name "Print" and the class (Word = bosa_sdm_Mocrosoft Office Word, Excel = bosa_SDM_XL9). I can not get any information about the controls. Is there a way to get this information and work with these windows? Link to comment Share on other sites More sharing options...
TurionAltec Posted October 1, 2009 Share Posted October 1, 2009 Office doesn't use standard controls, so it's hard to automate using controlclick, etc. However the "Word.au3" UDF contains a _WordDocPrint function Link to comment Share on other sites More sharing options...
gjenkins Posted October 1, 2009 Author Share Posted October 1, 2009 Office doesn't use standard controls, so it's hard to automate using controlclick, etc.However the "Word.au3" UDF contains a _WordDocPrint functionThanks T!I was reading, and came across a few sentences that explained the possible standard control problem. Unfortuantely, I am trying to develop a solution that spans across multiple applications, so the Word functions don't help. Well, they help if I were to develop similar functions for all supported applications. Ack! Link to comment Share on other sites More sharing options...
BugFix Posted October 1, 2009 Share Posted October 1, 2009 Here an Example for Word and Excel: ; in WinWord #include <Word.au3> $path = 'your *.doc path' $oWord = _WordCreate($path) _WordDocPrint($oWord) _WordQuit($oWord) ; in Excel #include <Excel.au3> $path = 'your *.xls path' $oExcel = _ExcelBookOpen($path) ; if several sheets activate that you want (name or number of sheet): $oSheet = $oExcel.Worksheets.Item(1) ; select print range $oSheet.PageSetup.PrintArea = 'A1:D8' $oSheet.PrintOut Best Regards BugFix 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