

This is all there is to my macro (for now). Select Landscape, and in the Apply to box, choose Selected text. Go to Layout, and open the Page Setup dialog box. Change part of a document to landscape Select the content that you want on a landscape page. WdDoc.SaveAs ActiveWorkbook.Path & "\test2", wdFormatXMLDocumentĭo While ("Merge") To change the orientation of the whole document, select Layout > Orientation. Set wdDoc = (Range("path_fichier").Value) It might be simpler to move or copy the list to a. You'd have to do the one job first, then change the orientation & Print Area specs to do the other. all pages printed from the same sheet must be in the same orientation.

If I step into the code right after this line the document IS in landscape but as soon as I click even once only in the document it goes back to portrait.ĭo you guys have an idea why this happens ? I can't seem to find anyone having this bug on Google. Well, Yes & No :-) It can be done, but not as a part of the same print job. I set it to landscape using VBA but it will always go back to portrait. I have most of my macro working as intended but the orientation can't seem to stay in place. Please have a look at our website and give your suggestions in the comment box.I have this ridiculous problem on ms-word 2007. In this article, we showed each step to saving an Excel file PDF in landscape mode. Read More: Excel Macro to Save as PDF (5 Suitable Examples) Our Excel file will be saved as PDF in landscape mode successfully. Now, go to the location from the File Manager.Click on the File tab of the worksheet.We have already set up the Excel file for landscape format. 📌 Step 4: Save a Copy of the Excel File in PDF Format Here, we can input the print area, titles, order, etc. Click on Print Titles from the Page Setup group.Width, Height, and Scale all are in default mode.Īt this stage, we will set up all the sheets before saving them in PDF.Choose Insert Page Break from the list.Choose Print Area from the Page Setup group.In this step, we will define Print Area, Page breaks, and Page scaling. The dotted line extends as the paper size changes. This page will cover that dot line area in the PDF file in one page. We can see a dotted line on the right side. Click on the arrow of the Orientation option of the Page Setup group. It is the most important part of this article.

Here, Normal is set as the default margin. Now, click on the arrow sign of the Margins.In the first step, we will customize the Page Setup. We will show each step to save Excel as PDF in landscape mode. Related Articles Steps to Save Excel as PDF Landscape
