Word Landscape page Macro

Greetings,
I am trying to utilize a macro which inserts a landscape page in my document. I am using a specific custom layout as per the headers and the footers on the document. The landscape page I wish to insert in the document should obtain the same headers and footers
and continue with the numbering. Unfortuantely, This macro inserts the landscape page however, It does it without the headers and footers and it also messes up the headers and footers for the page afterwards.
Sub Macro2()
Dim rng As Range
Dim i As Long, j As Long
Set rng = Selection.Range
rng.Start = ActiveDocument.Range.Start
i = rng.Sections.Count
rng.Collapse wdCollapseEnd
rng.InsertBreak wdSectionBreakNextPage
rng.InsertBreak wdSectionBreakNextPage
With ActiveDocument.Sections(i + 2)
For j = 1 To .Headers.Count
.Headers(j).LinkToPrevious = False
.Footers(j).LinkToPrevious = False
Next j
End With
With ActiveDocument.Sections(i + 1)
For j = 1 To .Headers.Count
With .Headers(j)
.LinkToPrevious = False
.LinkToPrevious = False
If .Range.Tables.Count > 0 Then
With .Range.Tables(1)
.PreferredWidthType = wdPreferredWidthPoints
.PreferredWidth = CentimetersToPoints(26.5)
End With
End If
End With
With .Footers(j)
.LinkToPrevious = False
.LinkToPrevious = False
If .Range.Tables.Count > 0 Then
With .Range.Tables(1)
.PreferredWidthType = wdPreferredWidthPoints
.PreferredWidth = CentimetersToPoints(26.5)
End With
End If
End With
Next j
With .PageSetup
.LineNumbering.Active = False
.Orientation = wdOrientLandscape
.TopMargin = CentimetersToPoints(2)
.BottomMargin = CentimetersToPoints(1.5)
.LeftMargin = CentimetersToPoints(2)
.RightMargin = CentimetersToPoints(1.5)
.HeaderDistance = CentimetersToPoints(1.5)
.FooterDistance = CentimetersToPoints(0.1)
.PageWidth = CentimetersToPoints(29.7)
.PageHeight = CentimetersToPoints(21)
End With
End With
End Sub

Hi R. Grech,
Since this issue is related to Office for developing,
This forum is for general questions and feedback related to Wordand this forum is for general questions and feedback related to Word.
I recommend you post this issue on the Office for developer forum for better assistance.
https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=worddev
The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
Best regards,
Greta Ge
TechNet Community Support
It's recommended to download and install
Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
programs.

Similar Messages

  • Landscape pages in Word revert to portrait in PDF when converted with Acrobat 9.

    My work group is using the PDF-T-Maker plugin to convert Word docs to PDF through Acrobat 9 Pro Extended. Lately, all the landscape pages have reverted to portrait in the conversion, but only for me. Everyone else in my group is  getting correct layout when they run the same process on the same docs. Today, I completely uninstalled and reinstalled Acrobat, then installed the updates (I'm on v.  9.3.1), but I've still got the same issue. I've checked the settings in Acrobat, Distiller, the PDF printer, and T-Maker, and I  think they're correct. Shots of the Distiller and T-Maker settings are below. Any ideas about what's going on?

    Looks like you have A4 pages. I would copy the PDF and then rotate the landscape pages (or portrait) individually (use the tools, not the view rotation) and then do the save to DOC or DOCX. That might do what you want. I would have expected it to notice the orientation, but I guess not. You did not mention the version of Acrobat. If you have not done the updates, you may want to do those first. Your issue may have been address with the updates.

  • I am new to mac and am trying to understand how to do something i did in Word. In Word you can set up document so that you have 2 pages per 8.5 x 11 landscape page. Each page is treated as a separate page. Can this be done in word for mac 2008?

    I am new to mac and am trying to understand how to do something i did in Word. In Word you can set up document so that you have 2 pages per 8.5 x 11 landscape page. Each page is treated as a separate page. Can this be done in word for mac 2008?

    Suggest you ask on the Microsoft Mac forums since it's their software you have a question about:
    http://answers.microsoft.com/en-us/mac

  • Why isn't my portrait page numbering showing up on landscape pages after creating PDF from Word?

    I have a lengthy Word document that has portrait and landscape oriented sections. The landscape sections have page numbering set up so that on screen it appears on the left, but in the printed book will have the page numbers in the same place as the portrait pages. For some reason when I create a PDF using the Adobe tab in Word and embed the fonts though, the portrait page numbers on my landscape pages do not show up. Does anyone know if there's a box or something I'm not checking?
    I'm using Microsoft 2010. Let me know if any other details are needed!

    Hi Liz,
    Can you share the file with me at [email protected] so that I can have a look.
    Regards,
    Anoop

  • How do I export from PDF to Word when PDF has both portrait and landscape pages in it?

    Most of the pdf is in portrait but a few are in landscape in the middle of the document and it totally screws up the rest of the document. Help! AND the portrait page size is 8.27 x 11/69.

    Looks like you have A4 pages. I would copy the PDF and then rotate the landscape pages (or portrait) individually (use the tools, not the view rotation) and then do the save to DOC or DOCX. That might do what you want. I would have expected it to notice the orientation, but I guess not. You did not mention the version of Acrobat. If you have not done the updates, you may want to do those first. Your issue may have been address with the updates.

  • Inserting a landscape page in a portrait document

    Thanks for you help in advance....
    I'd like to be able to insert a landscape page into my portrait document. I know how to do this in Word, but can't quite figure it in Pages 09.
    Can anyone help?
    Thanks!

    FranMatt80 wrote:
    Thanks for you help in advance....
    I'd like to be able to insert a landscape page into my portrait document. I know how to do this in Word, but can't quite figure it in Pages 09.
    Can anyone help?
    Yes I may.
    Searching in existing threads before asking would be an efficient practice.
    Your question was asked and responded many times.
    A Pages document can't contain two orientations.
    It's entirely Landscape or entirely Portrait.
    _Go to "Provide Pages Feedback" in the "Pages" menu_, describe what you wish.
    Then, cross your fingers, and wait _at least_ for iWork'10
    Yvan KOENIG (VALLAURIS, France) mardi 12 janvier 2010 11:00:17

  • Interactive PDF Form in Landscaped Page; Problems with Additional Pages

    Please see the attached screenshot.
    I created a form (in Word) which has 10 pages of the exact same fields except for the side number (the 10 pages number from 1 to 200) which numbers each line to be filled out by the end user.
    I have created each field for page 1 (no easy feat as Acrobat 11 did not recognize most of the necessary fields) and all of the checkboxes must be grouped so that only one checkbox is able to be picked.  When I try to distribute each of the fields to the other 9 pages, or even if I copy and paste the fields to page 2, then the fields turn portrait rather than landscaped and I am unable to rotate them.
    I have tried extracting page 1, rename it to page 2, update the numbering scheme (which throws everything out of alignment), and then reinsert it behind page 1, and again, it rotates the landscaped fields to portrait.
    Is there any way possible for me to EASILY recreate this page nine more times (I have already spent approximately 10 hours working on this one page getting everything created and lined up correctly)? 
    In doing some research yesterday, I saw that this was a software limitation issue and that Acrobat does not allow fields in landscaped pages to be recreated as landscaped fields (I do not have this problem with the same type of form created in portrait pages and can distribute fields all day long through pages and pages of PDFs.
    Does anyone have any suggestions or guidance that I can draw upon other than having to create each page separately (I just do not have the time as the one page took me about 10 hours)? 
    Thank you so much!

    That's very disappointing ...
    Thanks Bernd, for your answer!

  • Acrobat 6 Converting Portrait/Landscape Pages

    Hello,
    I am trying to convert a document to PDF which contains both landscape and portrait pages but everytime you try to convert to PDF it runs through the process for a few seconds then everything closes.
    I have discovered that if I change the landscape pages back to portrait it works. Is there anyway around this?

    It appears to print to PDF ok but the user is attempting to combine multiple documents into a PDF so this would not be a work around.
    The documents are word documents.

  • How do I convert a FrameMaker file containing both Portrait and Landscape pages into PDF?

    I have recently converted to FrameMaker 9 and Acrobat 9. In the FrameMaker manual I am creating, most of the pages have Portait orientation, but some have Landscape orientation. However, when I convert the manual to PDF using Acrobat Distiller, the Landscape pages become Portrait. This wasn't a problem when I converted the manual into PDF in previous versions of Acrobat Distiller, it appeared after I installed Acrobat 9. In other words, the FrameMaker file has worked before. I have also tried this on three different computers to make sure the computer is not the problem. Does anybody have any ideas that I could try to make this work?

    Jorunn, did you ever resolve this problem? If not, I've got a solution for you.
    In FrameMaker, select the book you want to create a PDF of, click File > Print, and select Adobe PDF as your printer.
    Click Properties and make sure you have the selections you want.
    Back on the Print Setup dialog, leave the Paper and Orientation as both Letter and Portrait respectively.
    On the Print Book dialog, select Print to File and browse to the correct location. Make certain to save this as a PostScript file (name.ps) and at the Safe Book As field, you want Single File selected.
    Again on the Print Book dialog, click the checkbox for Generate Adobe Data and click PDF Setup. On the PDF Setup for Selected Files dialog, at the PDF Job Options, select Press Quality or make the appropriate choices for your situation for Settings, Bookmarks, Tags, and Links.
    With Adobe Distiller open, File > Open and browse to the .ps file you indicated earlier. Also verify your Default Settings for the PDF are correct. When Distiller is finished, you can double-click the PDF file to open it and check that your portrait and landscape pages show correctly.

  • I am changing from Word to Pages. I have created my custom template with all my styles etc and that is what comes up when I go for a New Document. Fine. How do I get it to use the same Custom Template when I use Pages to open a Word document?

    I am changing from Word to Pages. I have created my custom template with all my styles etc and that is what comes up when I go for a New Document. Fine. How do I get it to use the same Custom Template when I use Pages to open a Word document?

    The template is a document in itself, it is not applied to an existing document whether it is a Pages document or a Word document converted to a Pages document.
    You would need to either copy and paste content, using existing styles, or apply the styles to the converted Word document.
    You can Import the Styles from an existing document and those imported Styles can be used to override the current document's styles:
    Menu > Format > Import Styles
    The process is simplified if the styles use the same names, otherwise you will need to delete the style you don't want and replace it with the one that you do want when asked, then the substitution is pretty straightforward.
    Peter

  • Why don't my pdf forms import into Word or Pages properly?

    Why is it that when I create a form in Acrobat Pro, fill it out and save it as a pdf file, and then import or place the saved file in either a Word or Pages document that ONLY the form fields are visible and not the filled in data?  I've tried everything I know and it happens each time.  Thanks.

    Have you actually tried to do it in a PC Version.  Usually it’s the other way round. Usually something can be done with little effort in PC Version, and not in Mac version. Or is PIA to do in the Mac version. Adobe takes as little effort as possibly with the Mac version of any of their products. They and many companies still have  the notion for anyone that wants to do serious work, you use a PC. Mac's are considered play toys.
    If given the proper software with equal features a Mac is more than capable of handling any job a PC can.

  • FrameMaker 10 Save as PDF and landscape pages

    Using FrameMaker 10 on Windows XP Professional SP3 32 bit system - When I use the Save as PDF function on a book containing both portrait and landscape pages, the landscape pages are clipped to portrait mode. If I print to Adobe PDF, the page orientation is correct in the PDF, however, no bookmarks are generated. If I check the Convert CMYK colorsto RGB setting in the PDF Setup for Selected Files dialog box, then the page orientation in the PDF is correct, and the bookmarks are generated as they were in FrameMaker 8.
    Is there a method to this madness?

    I have Acrobat 8 Pro. The explanation of the RGB mode with XP makes sense. I did not know that. Makes me wonder how Frame 8 was producing all the nice PDFs we have used for the last couple of years.
    I tried that setting because I saw others were having issues with that and wondered if there was a relationship between the two. Just a guess.
    Printing to a file and distilling it does not produce a PDF at all.
    Thanks for your help.

  • Dante font used in manuscript - when I try to save as a pdf document in Microsoft Word whole pages change their look, with wide gaps forming between certain paragraphs or sections. This does not happen with other fonts.

    Dante font used in manuscript … when I try to save as a pdf document in Microsoft Word whole pages change their look, with wide gaps forming between certain paragraphs or sections. This does not happen with other fonts.

    OK, we've got it!
    What is happening is that when you use Microsoft's save as PDF in Word, the font isn't embedded even though the font is tagged to allow embedding. Furthermore, Microsoft doesn't properly put the font name into the PDF file such that Acrobat or Reader can readily find the font installed on your system such that the text can be properly displayed and/or printed. Acrobat and Reader attempt to display and/or print the text using a “substitution font” and of course, as they say, YMMV (“your mileage may vary”)!
    I personally submitted the report of this problem (both the embedding and the font name problem) to Microsoft. They acknowledge the bug, tried a fix and provided me a build with it, but it wasn't right. Maybe they will ultimately fix it, maybe they won't. We don't know yet. We do know that if it is fixed, it will be fixed only for Office 2013 (problem occurs with all Office applications since they use the same PDF generation code) and thus such a fix won't help you.
    Adobe Acrobat Standard and Acrobat Pro  both provide an Adobe PDFMaker plug-in to Office applications (including full support for Office 2010) that adds an Acrobat Toolbar as well as a Save as Adobe PDF menu item. The resultant PDF file fully supports embedding of OpenType CFF, TrueType, and Type 1 fonts and in many other ways produces much superior PDF with a full range of PDF generation options not available with the Microsoft PDF. (Note that beginning with Office 2013, Microsoft does not support Type 1 fonts in Office documents at all, even for existing documents!) The Acrobat Office functions are widely used and respected in the end user community and whatever “issues” there are (all software has “issues” of some type - it is a matter of how many and how severe), you should be in much better shape for PDF production that with what you currently are using.
    Good luck and let us know if this resolves your problems. (Note that you can download and install a free fully-functional 30 trial of Acrobat Pro to assure that it meets your needs! You can then buy a license and activate what you already have installed.)
              - Dov

  • Turned on Mac mini and cannot get rid of the word definition page and get to home page. What's wrong?

    Turned on Mac mini and cannot get rid of the word definition page and get to my home page. What is the problem?

    Is this a screensaver?
    Whatever
    Push the power button and hold it until the mini shuts down, then start it again.

  • When Pages will support portrait and landscape page orientation in the same document?

    When Pages will finnaly support portrait and landscape page orientation in the same document?

    Only Apple would know, and it isn't telling.
    Peter

Maybe you are looking for