Print double sided - OzGrid Free Excel/VBA Help Forum
文章推薦指數: 80 %
Print double sided · Cells.Select · Selection.RowHeight = 32 · With ActiveSheet.PageSetup ·.PrintTitleRows = "" ·.PrintTitleColumns = "" · End With ... OzGridFreeExcel/VBAHelpForum Forum HELPFORUMS ExcelGeneral TMoNeE Student Points 720 Posts 90 IhaveamacrothatIwroteforthegroupdownstairsbuttheirprinterprintsdoublesidedandforthisjobtheydon'twantitto...whatsthecommandstoturnitoff?Ican'treallytestit,Iwouldassumeitslike.Duplex=Falseorsomething,butdoessomeoneknowforsure?WhenIrecordtheamacroanddoitnothingisdifferentthanIalreadyhave. Code Cells.Select Selection.RowHeight=32 WithActiveSheet.PageSetup .PrintTitleRows="" .PrintTitleColumns="" EndWith ActiveSheet.PageSetup.PrintArea="" WithActiveSheet.PageSetup .LeftHeader="ECI" .CenterHeader="&Pof&N" .RightHeader=Date-1 .LeftFooter="" .CenterFooter="" .RightFooter="" .LeftMargin=Application.InchesToPoints(0.75) .RightMargin=Application.InchesToPoints(0.75) .TopMargin=Application.InchesToPoints(1) .BottomMargin=Application.InchesToPoints(1) .HeaderMargin=Application.InchesToPoints(0.5) .FooterMargin=Application.InchesToPoints(0.5) .PrintHeadings=False .PrintGridlines=False .PrintComments=xlPrintNoComments .PrintQuality=600 .CenterHorizontally=False .CenterVertically=False .Orientation=xlLandscape .Draft=False .PaperSize=xlPaperLetter .FirstPageNumber=xlAutomatic .Order=xlDownThenOver .BlackAndWhite=False .Zoom=140 .PrintErrors=xlPrintErrorsDisplayed EndWith DisplayMore gmccreedy Professional Points 3,130 Posts 514 Re:Printdoublesidedbeforeyourecordamacro,lookthroughthsettingsoftheprintertofindwherethedoublesidedisdeclaredasdefault.everytprinterisdifferent,thisisnotanexcelsetting.Onceyoufindthesetting,thenrecordifnecssarythislookslikeitcouldbetheculpritthough. Code .Order=xlDownThenOver TMoNeE Student Points 720 Posts 90 Re:Printdoublesided Quotefromgmccreedy beforeyourecordamacro,lookthroughthsettingsoftheprintertofindwherethedoublesidedisdeclaredasdefault.everytprinterisdifferent,thisisnotanexcelsetting.Onceyoufindthesetting,thenrecordifnecssarythislookslikeitcouldbetheculpritthough. Code .Order=xlDownThenOver Nahthatsnotit,itsunderpagesetup,andtheoptionisjustgreyedoutifyourprinterdoesntsupportit...ifyouclickfile>pagesetup>optionsitsrightthere. gmccreedy Professional Points 3,130 Posts 514 Re:PrintdoublesidedIstandcorrected TMoNeE Student Points 720 Posts 90 Re:Printdoublesided Quotefromgmccreedy Istandcorrected Well,afterdoingsomeresearchitappearsthatthereisnowaytosettheduplex(IEDoublesidedorsinglesidedprinting)andtheonlyansweristodoabunchofSendkeyfunctionstobasicallyplayoutwhatyouwouldtypeonthekeyboard.Ijustcantbelievethatisafeasibleanswer,Iamgoingtohavetokeepdigging. iwrk4dedpr OzMVP(what..who..me???) ReactionsReceived 4 Points 22,969 Posts 4,237 Re:PrintdoublesidedTMoNeE,ThereareAPIfunctionswhichcanandwillreturnprinterinformation.Sothefollowingmaybeasolution.Thefunctiontoprintfront/backisashasbeenstateda"PRINTER"function.SowhatIwoulddoisrecordthestepsthatyoudotosetthepropertywhenprintingtotheproperprinter.You'llneedtofindPRINTERAPI's.IcantrytodigupsomecodethatIhaveandpostitifneedbe.However,intheAPI'syou'llneedtogettheselectedprinterproperties(lookingfortheprinterID/nottheonethattheusercansetbuttheonethattheprintersaysitis).Shouldbeabletogetastringlike"HP5550Se"(thisisanhypothetical).Noweithersetaconstantvalueinyourcodetothatnameandpriortoprintingyou'llneedtoquerytheAPIforthecurrentprinterandiftheprinterid'smatchthenrunthemacrothatyourecorded.Andyou'reright."Send-Keys"isacrappywayofdoing"anything"! iwrk4dedpr OzMVP(what..who..me???) ReactionsReceived 4 Points 22,969 Posts 4,237 Re:PrintdoublesidedHerearesomelinksfoundbygoogling"printer,api"http://www.absolutelydiverse.c…b_tips/hardcore/tip_4.htm TMoNeE Student Points 720 Posts 90 Re:PrintdoublesidedThanks,IthinkIamjustgoingtoletthemsettheprintermanuallythenrunthemacroThisisjusttoomuchtroubleheh,butIappreciatetheinformation. AndyPope OzMVP(Roobarb) ReactionsReceived 1 Points 56,831 Posts 11,304 Re:PrintdoublesidedHi,Normallytheproblemiswantingtoprintduplexwheretheprinterisinsinglesidedmode.Oneworkaroundistoaddanotherprinterwiththedefaultpropertiesoftherequiredprintmode,whichinyourcasewouldbesinglesided.Theninyourmacroyouprinttotheappropriateprinter.Itwillrequirethesettingupofaprinterandtheusersaddingitbutitneedonlybedoneonce.Hopingtheusersetstheprintermanuallywillonlyresultinfrustrationandwastepaper. Participatenow! Don’thaveanaccountyet?Registeryourselfnowandbeapartofourcommunity! RegisterYourself Login Share Facebook Twitter Reddit WhatsApp LinkedIn Pinterest XING Navigation OzGrid Excel/VBAConsultancy OzGridStore Training Freebies Forum UnresolvedThreads ForumRules Dashboard Articles PrivacyPolicy Search Options CurrentLocation OzGridFreeExcel/VBAHelpForum Forum HELPFORUMS ExcelGeneral UserMenu Loginorregister Thissiteusescookies.Bycontinuingtobrowsethissite,youareagreeingtoouruseofcookies. MoreDetails Close
延伸文章資訊
- 1How to get Duplex printing working in Excel? - Stack Overflow
Since the duplex option cannot be chosen by VBA directly, you can workaround this by adding the s...
- 2[Solved] Macro Code for Duplex Printing
Word VBA>Macro Code for Duplex Printing. Leftovercity 08:26 AM 01-26-2017. Hi Everyone, First tim...
- 3Thread: Excel VBA - Printing Front And Back - VBForums
excel has no provision in vba to print in duplex, even if it is in the printer dialog, and works ...
- 4Print double sided - OzGrid Free Excel/VBA Help Forum
Print double sided · Cells.Select · Selection.RowHeight = 32 · With ActiveSheet.PageSetup ·.Print...
- 5(Access Printer.Duplex 屬性) | Microsoft Docs
Office VBA reference topic.