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
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