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; } get { return _OutFileName; }
set { _OutFileName = value; } 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; FileName = fileName;
Stype = stype; Stype = stype;
OutFileName = outFileName; OutFileName = outFileName;
IsLandscape = isLandscape;
} }
public void GetAsciiFromWord() public void GetAsciiFromWord()
{ {
@ -87,6 +94,10 @@ namespace DataLoader
{ {
myWordDoc = new WordDoc(FileName); myWordDoc = new WordDoc(FileName);
myWordDoc.SetLineSpacing(LPI); myWordDoc.SetLineSpacing(LPI);
if (IsLandscape)
{
myWordDoc.MyWordDoc.PageSetup.Orientation = LBWdOrientation.wdOrientLandscape;
}
try try
{ {
DocLen = myWordDoc.Length; DocLen = myWordDoc.Length;