litlmike Posted February 18, 2016 Share Posted February 18, 2016 I just need to print a particular worksheet using _Excel_Print(), but I don't know how to print a worksheet that is NOT the default activesheet. How do I change _Excel_Print($oExcel, Default) Into something like _Excel_Print($oExcel, "ABC") or _Excel_Print($oExcel, 3) _ArrayPermute()_ArrayUnique()Excel.au3 UDF Link to comment Share on other sites More sharing options...
Jfish Posted February 19, 2016 Share Posted February 19, 2016 _Excel_Print($oAppl,$oAppl.Worksheets("Sheet3")) ;swap "Sheet3" for the name of the sheet you want to print Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt Link to comment Share on other sites More sharing options...
litlmike Posted February 19, 2016 Author Share Posted February 19, 2016 Thank you! _ArrayPermute()_ArrayUnique()Excel.au3 UDF Link to comment Share on other sites More sharing options...
Jfish Posted February 19, 2016 Share Posted February 19, 2016 Glad I could help. Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt Link to comment Share on other sites More sharing options...
qwiqshot Posted June 1, 2016 Share Posted June 1, 2016 how do you print 1 copy of a specific range of a specific sheet while on another sheet? I thought this would be it, but it does nothing, not even an error. _Excel_Print($oExcel, "A1:M55", 1, $oExcel.Worksheets("Cover")) this works fine, just need to know how to print "Cover" sheet range and then add to the very bottom without requiring moving to that tab. driving me nutty. ; print one page of contract for office copy _Excel_Print($oExcel, "A1:M55", 1, "Xerox WorkCentre 7556 PS Plain Paper") Sleep (500) ; print 2 copies for customer on legal paper (contract on back side) _Excel_Print($oExcel, "A1:M55", 2, "Xerox WorkCentre 7556 PS Contract Paper") Sleep (500) Link to comment Share on other sites More sharing options...
qwiqshot Posted June 1, 2016 Share Posted June 1, 2016 stumbled onto another article and adapted my line and now it does print the correct sheet from another sheet, but prints a ridiculous range _Excel_Print($oExcel,$oExcel.Worksheets("Cover").Range("A1:M55"), 1, "Xerox WorkCentre 7556 PS Plain Paper") I only want to print A1 thru M55. It is printing 5 pages of data off of the sheet I want printed from, lol Link to comment Share on other sites More sharing options...
qwiqshot Posted June 1, 2016 Share Posted June 1, 2016 Disregard, had right margin set too far. Hope that helps someone out. 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