litlmike

_Excel_Print() a Particular Worksheet

7 posts in this topic




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)

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Disregard, had  right margin set too far. Hope that helps someone out.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now