Added IsLandscape property to WordDocument class

Utilized IsLandscape property to set WordDocument orientation
This commit is contained in:
Rich 2013-06-11 18:40:11 +00:00
parent 4885c21734
commit f03615dd7d

View File

@ -74,11 +74,18 @@ namespace DataLoader
get { return _OutFileName; }
set { _OutFileName = value; }
}
public WordDocument(string fileName, string stype, string outFileName)
private bool _IsLandscape;
public bool IsLandscape
{
get { return _IsLandscape; }
set { _IsLandscape = value; }
}
public WordDocument(string fileName, string stype, string outFileName, bool isLandscape)
{
FileName = fileName;
Stype = stype;
OutFileName = outFileName;
IsLandscape = isLandscape;
}
public void GetAsciiFromWord()
{
@ -87,6 +94,10 @@ namespace DataLoader
{
myWordDoc = new WordDoc(FileName);
myWordDoc.SetLineSpacing(LPI);
if (IsLandscape)
{
myWordDoc.MyWordDoc.PageSetup.Orientation = LBWdOrientation.wdOrientLandscape;
}
try
{
DocLen = myWordDoc.Length;