akokin
09-04-2007, 11:52 PM
Hi. I want to insert break page for selection of text and set for it orientation (wdOrientLandscape). Only for selection. I do in such a way:
Dim myRange As Range
Set myRange = ActiveDocument.Range(Start:=Selection.Start, End:=Selection.End)
With myRange
.Collapse direction:=wdCollapseStart
.InsertBreak Type:=wdSectionBreakNextPage
.PageSetup.Orientation = wdOrientLandscape
End With
This code is inserting break before selection and do set orientation of landscape. But I want it to only for myRange but not for all pages. How I should do next?
Thanks.
Dim myRange As Range
Set myRange = ActiveDocument.Range(Start:=Selection.Start, End:=Selection.End)
With myRange
.Collapse direction:=wdCollapseStart
.InsertBreak Type:=wdSectionBreakNextPage
.PageSetup.Orientation = wdOrientLandscape
End With
This code is inserting break before selection and do set orientation of landscape. But I want it to only for myRange but not for all pages. How I should do next?
Thanks.