Excel 365 Print Preview - vba - Stack Overflow

文章推薦指數: 80 %
投票人數:10人

BTW - Using the .PrintPreview method in Word 365 VBA brings up the 365 PrintPreview dialogue, as you would expect. vba excel printing office365. Resultsfromthe2022DeveloperSurveyarenowavailable Home Public Questions Tags Users Companies Collectives ExploreCollectives Teams StackOverflowforTeams –Startcollaboratingandsharingorganizationalknowledge. CreateafreeTeam WhyTeams? Teams CreatefreeTeam Collectives™onStackOverflow Findcentralized,trustedcontentandcollaboratearoundthetechnologiesyouusemost. Learnmore Teams Q&Aforwork Connectandshareknowledgewithinasinglelocationthatisstructuredandeasytosearch. Learnmore Excel365PrintPreview AskQuestion Asked 6years,8monthsago Modified 6years,8monthsago Viewed 1ktimes 0 I'musingExcel365onWindows7Home64bit.WhenIopenPrintPreviewfromtheExceluserinterfaceIgetawindowwithoptionslikethis: https://www.flickr.com/photos/132482128@N08/21711947524/in/dateposted-public/ FromthiswindowIcanpreviewthewholeprintfile,makeadjustmentstomargins,selecttheprintertouse,etc.IwouldliketoaccessthiswindowandtheseoptionsfromVBA.HoweverwhenIuse: ActiveWorkbook.Sheets("SheetName").PrintOutPreview:=True or: ActiveWorkbook.Sheets("SheetName").PrintPreviewEnableChanges:=True Igetawindowwithoptionslikethis: https://www.flickr.com/photos/132482128@N08/21713621773/in/dateposted-public/ Icanonlyviewthefirstpageoftheprintfile,andIamunabletochangetheprinter.Ihavetriedthis: Application.Dialogs(xlDialogPrint).Show butitstilldoesnotbringupthemodernExcel365PrintPreviewdialogueanddoesn'tallowmetodefinewhatIwantprinted. WhatamIdoingwrong? HowdoIgetthenew365typePrintPreview? BTW-Usingthe.PrintPreviewmethodinWord365VBAbringsupthe365PrintPreviewdialogue,asyouwouldexpect. vbaexcelprintingoffice365 Share Improvethisquestion Follow editedOct21,2015at4:27 pnuts 56.9k99goldbadges8282silverbadges135135bronzebadges askedOct20,2015at16:48 RZBRZB 133bronzebadges 1 Ihavedroppedbacktousing"ActiveWorkbook.Sheets("SheetName").PrintOutPreview:=True".IcouldfindnowayofstoppingtheVBArunningon,orcontrollingthe"PrintActiveSheets/PrintSelection"optionwhenusingApplication.CommandBars.ExecuteMso".Alsoitgavetheusertoomuchaccesstotheworksheets.ThanksExcelHero.–RZB – RZB Oct29,2015at11:37 Addacomment  |  1Answer 1 Sortedby: Resettodefault Highestscore(default) Trending(recentvotescountmore) Datemodified(newestfirst) Datecreated(oldestfirst) 0 Trythis: Application.CommandBars.ExecuteMso"PrintPreviewAndPrint" Reference:row649inthisworkbook: http://excelhero.com/resource/excel2013ribboncontrolidentifiers.xlsx Share Improvethisanswer Follow editedOct20,2015at17:52 answeredOct20,2015at17:10 ExcelHeroExcelHero 13.8k44goldbadges2828silverbadges3838bronzebadges 2 Hmmm-Irespondedtothisearliertodaybutitdoesn'tseemtohaveturnedup!Opps-looksliketheenterkeypostsit.HmmmAhh-shiftenter...Anyway-Thankyousomuchforthissolution... – RZB Oct21,2015at17:59 @RZBDoesthisnotansweryourquestion? – ExcelHero Oct24,2015at15:33 Addacomment  |  YourAnswer ThanksforcontributingananswertoStackOverflow!Pleasebesuretoanswerthequestion.Providedetailsandshareyourresearch!Butavoid…Askingforhelp,clarification,orrespondingtootheranswers.Makingstatementsbasedonopinion;backthemupwithreferencesorpersonalexperience.Tolearnmore,seeourtipsonwritinggreatanswers. Draftsaved Draftdiscarded Signuporlogin SignupusingGoogle SignupusingFacebook SignupusingEmailandPassword Submit Postasaguest Name Email Required,butnevershown PostYourAnswer Discard Byclicking“PostYourAnswer”,youagreetoourtermsofservice,privacypolicyandcookiepolicy Nottheansweryou'relookingfor?Browseotherquestionstaggedvbaexcelprintingoffice365oraskyourownquestion. TheOverflowBlog CelebratingtheStackExchangesitesthatturnedtenyearsoldinSpring2022  GitHubCopilotishere.Butwhat’stheprice?(Ep.457) FeaturedonMeta Testingnewtrafficmanagementtool Duplicatedvotesarebeingcleanedup Trending:Anewanswersortingoption AskWizardTestResultsandNextSteps Updatedbuttonstylingforvotearrows:currentlyinA/Btesting Linked 0 ExcelprintpreviewasFile->Print Related 2086 HowdoIcreateanExcel(.XLSand.XLSX)fileinC#withoutinstallingMicrosoftOffice? 1493 HowcanIflushtheoutputoftheprintfunction? 2267 What'sthesimplestwaytoprintaJavaarray? 1647 HowtoprinttostderrinPython? 605 HowtoavoidusingSelectinExcelVBA 0 excel2010crasheswhenprintingandprint.preview 710 HowtouseRegularExpressions(Regex)inMicrosoftExcelbothin-cellandloops 1 Excel-3pagesinPrintPreview-4inPrintout 1 Whenusing"Ctrl+P"or"File-Print"theWorkbook.BeforePrintevent(Excel)isnotcalledbeforetheprintpreviewisshown HotNetworkQuestions Howdoessoapunderminethechurchin"AConnecticutYankee"? Howtostopfraudulentrecurringcreditcardtransactionsbeingforwardedtonewcard? Isthereapre-installedGUItexteditorthatcanedithtmlfileswithoutenteringWYSIWYGmode? OMNImagazineshortstoryaboutgenerationshipcaretakerinstantiatedtoevaluateplanetviability CanallLegoLococharactersberecreatedinreallife? Whyarethesetwoquotientspacesnothomeomorphic? CanIskipthefirstlegofajourney,onatwowayflight,onalowcostcarrier? ReturnNULLwhendistinctvalueselsereturnvalue Whatisthefunctionorbenefitofincludingjugglingmechanicsinafightinggame? DidVolodymyrZelenskyysaythat"ifsomeoneinUkrainefeelsRussian,theyshouldleaveforRussia"? Wouldtherebeanyadvantagestohavingallhandsandnolegs? Whydon’twecalculatetheaverageofanentiregivenpopulationinsteadofcomputingconfidenceintervaltoestimatethepopulationmean? Feelslikeyouhaveseenthismanytimes Howwouldyoumakeasphereholeinabiggersphere? Not-Roman-NumeralAddition HowdidtheSun-1handlepagefaultsdespitehavingtheoriginal68000processor? Howtomovemeshsymmetricalwithingeometrywitheachother WhatdoestheWesthavetogainbynotallowingRussiatopayitsdebt? Doingalittletrollingwiththemicrowavetimer HowshallIproceedifmycarmaycontainillegaldrugsanddrugparaphernaliabeforeenteringCanadabycarfromtheUS? Whynothave`Prop:Set`inCoq? CreatingacampaignthatendswithaTPKbydesign Whyhadn'tthewestarrestedRussianbillionairesforcorruption/moneylaunderingpriortotheUkrainewar? ro1000annu1000era50en100o501ng morehotquestions Questionfeed SubscribetoRSS Questionfeed TosubscribetothisRSSfeed,copyandpastethisURLintoyourRSSreader. lang-vb Yourprivacy Byclicking“Acceptallcookies”,youagreeStackExchangecanstorecookiesonyourdeviceanddiscloseinformationinaccordancewithourCookiePolicy. Acceptallcookies Customizesettings  



請為這篇文章評分?