/// <summary> /// </summary> /// <param name="document"></param> /// <returns></returns> public static int GetDefaultSpaceBefore(this WordprocessingDocument document) { if (document == null) { throw new ArgumentNullException("document"); } var pPr = document.GetParagraphPropertiesBaseStyle(); if (pPr.SpacingBetweenLines == null) { return(0); } if (pPr.SpacingBetweenLines.Before == null) { return(0); } return(int.Parse(pPr.SpacingBetweenLines.Before)); }