eagle4life69 Posted May 4, 2011 Share Posted May 4, 2011 OK so this is what I do right now.... I create packing slips for my job, All the information is passed to Excel using the Excel commands and it works great, but I have Idiots for coworkers and they seem to break it every time. So what I would like is to maybe move the packing slip excel file to a crystal report (or anything I can just file print). What is the best way? My goal is just to have the report print and not have them worry about it, sounds simple but I have no bases on how to start. I have all the variables like Address and Name and so on, but how do I make it easier/faster? Thanks for your help on this. Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 4, 2011 Share Posted May 4, 2011 (edited) Why not just print it from Excel, since you are already there? $oExcel.Activesheet.printout Edited May 4, 2011 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
eagle4life69 Posted May 4, 2011 Author Share Posted May 4, 2011 I do thats the easy part. What I want is to get away from excel if I had a way to just print out a report without needing to open excel then fill out the packing slip then print just takes time I want to get rid of Link to comment Share on other sites More sharing options...
MrMitchell Posted May 5, 2011 Share Posted May 5, 2011 Where's the data coming from? Try hiding the Excel window so the idiots can't find it while Excel does its thing in the background? Link to comment Share on other sites More sharing options...
eagle4life69 Posted May 5, 2011 Author Share Posted May 5, 2011 I'm holding the data online I receive everything via a ssl webpage. I could hide the excel page but I know with crystal reports it can be almost instant on the print part, when I load the excel page it can take a min to fill out. My goal would be to have it print the labels and packing slip at the same time, right now I print the labels and then print the packing slip. The quicker I can do this the more production can get done Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 5, 2011 Share Posted May 5, 2011 Some apps do things very quickly only because they are already running in the background. If your hidden Excel instance is already up, then changing a few cells and printing will happen nearly "instantly". The only delay would be if you Open/Print/Close on Excel for every ticket/slip. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
eagle4life69 Posted May 6, 2011 Author Share Posted May 6, 2011 Some apps do things very quickly only because they are already running in the background. If your hidden Excel instance is already up, then changing a few cells and printing will happen nearly "instantly". The only delay would be if you Open/Print/Close on Excel for every ticket/slip.oooooohhhhhhh now that is an Idea leave it open Link to comment Share on other sites More sharing options...
eagle4life69 Posted May 9, 2011 Author Share Posted May 9, 2011 ok so I notice there is no documentation on using $oExcel.Activesheet.printout I have tried it and it prints it out like a charm. Now how do I set my options, if I need 3 labels I print pages 1-3 how can I tell it which pages to print? Thanks for your help Link to comment Share on other sites More sharing options...
MrMitchell Posted May 9, 2011 Share Posted May 9, 2011 (edited) You need to look in the MSDN reference for the .printout method. It might also be in the Excel VBA help. For me, it's open Excel, press ALT+F11, then press F2, type "printout", press Enter.Edit, add MSDN link: http://msdn.microsoft.com/en-us/library/bb179158%28v=office.12%29.aspxHere's the syntax: expression.PrintOut(From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, IgnorePrintAreas)All are optional, so just try $oExcel.Activesheet.printout(1,3) Edited May 9, 2011 by MrMitchell 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