Return LPI value before resetting.

This commit is contained in:
Kathy Ruffing 2012-07-03 15:59:26 +00:00
parent 0cf5331132
commit 73084c36eb

View File

@ -55,18 +55,32 @@ namespace Volian.MSWord
{
MyWordDoc.Close(false);
}
public void SetLineSpacing(float linesPerInch) // if need landscape set too: , bool landscape)
public float SetLineSpacing(float linesPerInch) // if need landscape set too: , bool landscape)
{
float retval = 0;
LBSelection selection = MyWordApp.Selection;
selection.WholeStory();
retval = selection.ParagraphFormat.LineSpacing;
selection.ParagraphFormat.SpaceBefore = 0;
selection.ParagraphFormat.SpaceAfter = 0;
selection.ParagraphFormat.LineSpacingRule = LBWdLineSpacing.wdLineSpaceExactly;
selection.ParagraphFormat.LineSpacing = 72 / linesPerInch;
return retval;
}
public float Length
{
get { return MyWordDoc.Length; }
get
{
try
{
return MyWordDoc.Length;
}
catch (Exception ex)
{
Console.WriteLine("Error Getting Length, {0}", ex.Message);
}
return 0;
}
}
public static void CloseApp()
{