Specifies which pages the page border is printed on.
[Visual Basic]
Public Enum PageBorderAppliesTo
[C#]public enum PageBorderAppliesTo
Remarks
Example
Creates a page border that looks like a wide blue band at the top of the first page only.
[C#]
Document doc = new Document();
PageSetup ps = doc.Sections[0].PageSetup;
ps.BorderAlwaysInFront = false;
ps.BorderDistanceFrom = PageBorderDistanceFrom.PageEdge;
ps.BorderAppliesTo = PageBorderAppliesTo.FirstPage;
Border border = ps.Borders[BorderType.Top];
border.LineStyle = LineStyle.Single;
border.LineWidth = 30;
border.Color = System.Drawing.Color.Blue;
border.DistanceFromText = 0;
doc.Save(MyDir + "PageSetup.PageBorderTop Out.doc");
[Visual Basic]
Dim doc As Document = New Document()
Dim ps As PageSetup = doc.Sections(0).PageSetup
ps.BorderAlwaysInFront = False
ps.BorderDistanceFrom = PageBorderDistanceFrom.PageEdge
ps.BorderAppliesTo = PageBorderAppliesTo.FirstPage
Dim border As Border = ps.Borders(BorderType.Top)
border.LineStyle = LineStyle.Single
border.LineWidth = 30
border.Color = System.Drawing.Color.Blue
border.DistanceFromText = 0
doc.Save(MyDir & "PageSetup.PageBorderTop Out.doc")
Members
| Member Name | Description | Value |
| AllPages | Page border is shown on all pages of the section. | 0 |
| FirstPage | Page border is shown on the first page of the section only. | 1 |
| OtherPages | Page border is shown on all pages except the first page of the section. | 2 |
Requirements
Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll)
See Also
Aspose.Words Namespace | PageSetup | BorderAppliesTo