Insert Landscape within Portrait

A

aehan

I'm having trouble programming a template to insert a new A3 landscape page
within an existing A4 portrait page. I want to produce A4/A3/A4 where the
A4 page already has text. I have done this successfully (well it seems to
be) with A4 Portrait/A4 Landscap/A4 Portrait, and have been trying
unsuccessfully to do the same with A3 Landscape for days! Can anyone help?
The code I am using (and I know it's probably inefficient) is:

Sub InsertA3Landscape()

With Selection
.InsertNewPage
.InsertBreak Type:=wdSectionBreakContinuous
End With

With Selection.PageSetup
.Orientation = wdOrientLandscape
.PageWidth = 1190.6
.PageHeight = 841.8
End With

Selection.GoTo what:=wdGoToPage, which:=wdGoToPrevious

If Selection.PageSetup.Orientation = wdOrientPortrait And
Selection.PageSetup.PageWidth = 595.3 And _
Selection.PageSetup.PageHeight = 841.9 Then
With Selection
.GoTo Page, which:=wdGoToNext
.GoTo Page, which:=wdGoToNext
.InsertBreak Type:=wdSectionBreakContinuous
.GoTo Break, which:=wdGoToNext
.Delete Unit:=wdCharacter, Count:=2
.PageSetup.Orientation = wdOrientPortrait And
Selection.PageSetup.PageWidth = 595.3 And _
Selection.PageSetup.PageHeight = 841.9
.GoTo Page, , Count:=-1
End With
End If

End Sub

Any ideas would be really welcome and appreciated.

Thank you
Aehan
 
D

Doug Robbins - Word MVP

Use

Selection.InsertBreak wdSectionBreakNextPage
With Selection.Sections(1).PageSetup
.Orientation = wdOrientLandscape
.PaperSize = wdPaperA3
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top