Forums     Knowledge Base     OfficeWriter Online     
 
 
This documentation is for
OfficeWriter v3.8.1
.NET Platform

View Docs for Another
Version or Platform

Programmer's Reference > WordApplication API > ParagraphFormatting > LineSpacing

LineSpacing Property


C# Signature:

VB.NET Signature:


Description:

Sets or returns an int representing the line spacing for a paragraph.

There are three types of line spacing: AtLeast, Exactly, and Multiple. AtLeast and Exactly are set in twips. One twip = (1/20 pt) or (1/1440 in). Multiple is set in number of lines. AtLeast must be between 0 pt (0 twips) and 1584 pt (31680 twips). Exactly must be between 0.7 pt (14 twips) and 1584 pt (31680 twips). Multiple must be between 1 line and 132 lines. Values beyond these for all 3 types will be adjusted automatically.

MS Word equivalent: Format menu > Paragraph... > Indents and Spacing > Spacing section > At:

LineSpacing is a read / write property.



Examples:

[csharp]
// Return LineSpacing
int lineSpacing = oParagraphFormatting.LineSpacing;
// Set LineSpacing to 2 lines
oParagraphFormatting.set_LineSpacing(2, ParagraphFormatting.SpacingRule.Multiple);
[vbnet]
' Return LineSpacing
Dim lineSpacing As Integer = oParagraphFormatting.LineSpacing
' Set LineSpacing to 1.5 lines
oParagraphFormatting.LineSpacing(2, ParagraphFormatting.SpacingRule.Multiple)


Getter

Signature:

public int LineSpacing

Returns:

int An int representing the line spacing for a paragraph.

Setter

Signature:

public void LineSpacing int spacing , ParagraphFormatting.SpacingRule type

Type:

int

Parameters:

ParagraphFormatting.SpacingRule type The type of spacing to use. See SpacingRule for a discussion on the different types of spacing.



Copyright 2007 © SoftArtisans, Inc. All Rights Reserved.