Added access to MSWord’s Tables
This commit is contained in:
parent
a50bdd50b2
commit
10607cce7d
@ -227,6 +227,18 @@ namespace LBWordLibrary
|
|||||||
{
|
{
|
||||||
get { return new LBParagraphs(GetProperty("Paragraphs")); }
|
get { return new LBParagraphs(GetProperty("Paragraphs")); }
|
||||||
}
|
}
|
||||||
|
public LBTables Tables
|
||||||
|
{
|
||||||
|
get { return new LBTables(GetProperty("Tables")); }
|
||||||
|
}
|
||||||
|
public LBCells Cells
|
||||||
|
{
|
||||||
|
get { return new LBCells(GetProperty("Cells")); }
|
||||||
|
}
|
||||||
|
public LBRows Rows
|
||||||
|
{
|
||||||
|
get { return new LBRows(GetProperty("Rows")); }
|
||||||
|
}
|
||||||
public void WholeStory()
|
public void WholeStory()
|
||||||
{
|
{
|
||||||
InvokeMethod("WholeStory");
|
InvokeMethod("WholeStory");
|
||||||
@ -287,8 +299,43 @@ namespace LBWordLibrary
|
|||||||
{
|
{
|
||||||
InvokeMethod("InsertSymbol", CharacterNumber, Font, Unicode, Bias);
|
InvokeMethod("InsertSymbol", CharacterNumber, Font, Unicode, Bias);
|
||||||
}
|
}
|
||||||
|
public int MoveRight()
|
||||||
|
{
|
||||||
|
return InvokeMethod("MoveRight", Missing.Value, Missing.Value, Missing.Value) as int? ?? 0;
|
||||||
|
}
|
||||||
|
public int MoveRight(object Unit, object Count, object Extend)
|
||||||
|
{
|
||||||
|
return InvokeMethod("MoveRight", Unit, Count, Extend) as int? ?? 0;
|
||||||
|
}
|
||||||
|
public int MoveLeft()
|
||||||
|
{
|
||||||
|
return InvokeMethod("MoveLeft", Missing.Value, Missing.Value, Missing.Value) as int? ?? 0;
|
||||||
|
}
|
||||||
|
public int MoveLeft(object Unit, object Count, object Extend)
|
||||||
|
{
|
||||||
|
return InvokeMethod("MoveLeft", Unit, Count, Extend) as int? ?? 0;
|
||||||
|
}
|
||||||
|
public void SelectCell()
|
||||||
|
{
|
||||||
|
InvokeMethod("SelectCell");
|
||||||
|
}
|
||||||
|
public void SelectRow()
|
||||||
|
{
|
||||||
|
InvokeMethod("SelectRow");
|
||||||
|
}
|
||||||
|
public void SelectColumn()
|
||||||
|
{
|
||||||
|
InvokeMethod("SelectColumn");
|
||||||
|
}
|
||||||
|
public void TypeParagraph()
|
||||||
|
{
|
||||||
|
InvokeMethod("TypeParagraph");
|
||||||
|
}
|
||||||
|
public void TypeBackspace()
|
||||||
|
{
|
||||||
|
InvokeMethod("TypeBackspace");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public partial class LBDocumentClass : LBComObject
|
public partial class LBDocumentClass : LBComObject
|
||||||
{
|
{
|
||||||
public LBDocumentClass() { }
|
public LBDocumentClass() { }
|
||||||
@ -322,6 +369,15 @@ namespace LBWordLibrary
|
|||||||
get { return (GetProperty("Saved") as Boolean? ?? false); }
|
get { return (GetProperty("Saved") as Boolean? ?? false); }
|
||||||
set { SetProperty("Saved", value); }
|
set { SetProperty("Saved", value); }
|
||||||
}
|
}
|
||||||
|
public LBTables Tables
|
||||||
|
{
|
||||||
|
get { return new LBTables(GetProperty("Tables")); }
|
||||||
|
}
|
||||||
|
public float DefaultTabStop
|
||||||
|
{
|
||||||
|
get { return (GetProperty("DefaultTabStop") as float? ?? 0); }
|
||||||
|
set { SetProperty("DefaultTabStop", value); }
|
||||||
|
}
|
||||||
public void SaveAs2000()
|
public void SaveAs2000()
|
||||||
{
|
{
|
||||||
InvokeMethod("SaveAs2000", Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value);
|
InvokeMethod("SaveAs2000", Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value);
|
||||||
@ -423,17 +479,7 @@ namespace LBWordLibrary
|
|||||||
}
|
}
|
||||||
public String Text
|
public String Text
|
||||||
{
|
{
|
||||||
get
|
get { return (GetProperty("Text").ToString()); }
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
return (GetProperty("Text").ToString());
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
set { SetProperty("Text", value); }
|
set { SetProperty("Text", value); }
|
||||||
}
|
}
|
||||||
public LBRange GoTo()
|
public LBRange GoTo()
|
||||||
@ -479,6 +525,21 @@ namespace LBWordLibrary
|
|||||||
get { return (GetProperty("SpaceBeforeAuto") as int? ?? 0); }
|
get { return (GetProperty("SpaceBeforeAuto") as int? ?? 0); }
|
||||||
set { SetProperty("SpaceBeforeAuto", value); }
|
set { SetProperty("SpaceBeforeAuto", value); }
|
||||||
}
|
}
|
||||||
|
public LBWdParagraphAlignment Alignment
|
||||||
|
{
|
||||||
|
get { return (LBWdParagraphAlignment)GetProperty("Alignment"); }
|
||||||
|
set { SetProperty("Alignment", value); }
|
||||||
|
}
|
||||||
|
public float FirstLineIndent
|
||||||
|
{
|
||||||
|
get { return (GetProperty("FirstLineIndent") as float? ?? 0); }
|
||||||
|
set { SetProperty("FirstLineIndent", value); }
|
||||||
|
}
|
||||||
|
public float LeftIndent
|
||||||
|
{
|
||||||
|
get { return (GetProperty("LeftIndent") as float? ?? 0); }
|
||||||
|
set { SetProperty("LeftIndent", value); }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public enum LBWdSelectionType
|
public enum LBWdSelectionType
|
||||||
{
|
{
|
||||||
@ -597,6 +658,11 @@ namespace LBWordLibrary
|
|||||||
get { return (LBWdUnderline)GetProperty("Underline"); }
|
get { return (LBWdUnderline)GetProperty("Underline"); }
|
||||||
set { SetProperty("Underline", value); }
|
set { SetProperty("Underline", value); }
|
||||||
}
|
}
|
||||||
|
public int Bold
|
||||||
|
{
|
||||||
|
get { return (GetProperty("Bold") as int? ?? 0); }
|
||||||
|
set { SetProperty("Bold", value); }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public enum LBWdInformation
|
public enum LBWdInformation
|
||||||
{
|
{
|
||||||
@ -674,6 +740,67 @@ namespace LBWordLibrary
|
|||||||
return InvokeMethod("GetEnumerator");
|
return InvokeMethod("GetEnumerator");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public partial class LBTables : LBComObjectList<LBTables, LBTable> /* Collection */
|
||||||
|
{
|
||||||
|
public LBTables(Object item)
|
||||||
|
{
|
||||||
|
Item = item;
|
||||||
|
}
|
||||||
|
public LBTable Add(LBRange Range, int NumRows, int NumColumns)
|
||||||
|
{
|
||||||
|
return new LBTable(InvokeMethod("Add", Range, NumRows, NumColumns, Missing.Value, Missing.Value));
|
||||||
|
}
|
||||||
|
public LBTable Add(LBRange Range, int NumRows, int NumColumns, object DefaultTableBehavior, object AutoFitBehavior)
|
||||||
|
{
|
||||||
|
return new LBTable(InvokeMethod("Add", Range, NumRows, NumColumns, DefaultTableBehavior, AutoFitBehavior));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public partial class LBCells : LBComObjectList<LBCells, LBCell> /* Collection */
|
||||||
|
{
|
||||||
|
public LBCells(Object item)
|
||||||
|
{
|
||||||
|
Item = item;
|
||||||
|
}
|
||||||
|
public LBWdCellVerticalAlignment VerticalAlignment
|
||||||
|
{
|
||||||
|
get { return (LBWdCellVerticalAlignment)GetProperty("VerticalAlignment"); }
|
||||||
|
set { SetProperty("VerticalAlignment", value); }
|
||||||
|
}
|
||||||
|
public float Height
|
||||||
|
{
|
||||||
|
get { return (GetProperty("Height") as float? ?? 0); }
|
||||||
|
set { SetProperty("Height", value); }
|
||||||
|
}
|
||||||
|
public System.Object GetEnumerator()
|
||||||
|
{
|
||||||
|
return InvokeMethod("GetEnumerator");
|
||||||
|
}
|
||||||
|
public void Merge()
|
||||||
|
{
|
||||||
|
InvokeMethod("Merge");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public partial class LBRows : LBComObjectList<LBRows, LBRow> /* Collection */
|
||||||
|
{
|
||||||
|
public LBRows(Object item)
|
||||||
|
{
|
||||||
|
Item = item;
|
||||||
|
}
|
||||||
|
public int HeadingFormat
|
||||||
|
{
|
||||||
|
get { return (GetProperty("HeadingFormat") as int? ?? 0); }
|
||||||
|
set { SetProperty("HeadingFormat", value); }
|
||||||
|
}
|
||||||
|
public LBRow First
|
||||||
|
{
|
||||||
|
get { return new LBRow(GetProperty("First")); }
|
||||||
|
}
|
||||||
|
public int AllowBreakAcrossPages
|
||||||
|
{
|
||||||
|
get { return (GetProperty("AllowBreakAcrossPages") as int? ?? 0); }
|
||||||
|
set { SetProperty("AllowBreakAcrossPages", value); }
|
||||||
|
}
|
||||||
|
}
|
||||||
public partial class LBShapes : LBComObjectList<LBShapes, LBShape> /* Collection */
|
public partial class LBShapes : LBComObjectList<LBShapes, LBShape> /* Collection */
|
||||||
{
|
{
|
||||||
public LBShapes(Object item)
|
public LBShapes(Object item)
|
||||||
@ -839,6 +966,18 @@ namespace LBWordLibrary
|
|||||||
wdLineSpaceExactly = 4,
|
wdLineSpaceExactly = 4,
|
||||||
wdLineSpaceMultiple = 5
|
wdLineSpaceMultiple = 5
|
||||||
}
|
}
|
||||||
|
public enum LBWdParagraphAlignment
|
||||||
|
{
|
||||||
|
wdAlignParagraphLeft = 0,
|
||||||
|
wdAlignParagraphCenter = 1,
|
||||||
|
wdAlignParagraphRight = 2,
|
||||||
|
wdAlignParagraphJustify = 3,
|
||||||
|
wdAlignParagraphDistribute = 4,
|
||||||
|
wdAlignParagraphJustifyMed = 5,
|
||||||
|
wdAlignParagraphJustifyHi = 7,
|
||||||
|
wdAlignParagraphJustifyLow = 8,
|
||||||
|
wdAlignParagraphThaiJustify = 9
|
||||||
|
}
|
||||||
public partial class LBReplacement : LBComObject
|
public partial class LBReplacement : LBComObject
|
||||||
{
|
{
|
||||||
public LBReplacement() { }
|
public LBReplacement() { }
|
||||||
@ -967,6 +1106,59 @@ namespace LBWordLibrary
|
|||||||
get { return new LBRange(GetProperty("Range")); }
|
get { return new LBRange(GetProperty("Range")); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public partial class LBTable : LBComObject
|
||||||
|
{
|
||||||
|
public LBTable() { }
|
||||||
|
public LBTable(Object item) : base(item) { }
|
||||||
|
public LBColumns Columns
|
||||||
|
{
|
||||||
|
get { return new LBColumns(GetProperty("Columns")); }
|
||||||
|
}
|
||||||
|
public LBRows Rows
|
||||||
|
{
|
||||||
|
get { return new LBRows(GetProperty("Rows")); }
|
||||||
|
}
|
||||||
|
public float TopPadding
|
||||||
|
{
|
||||||
|
get { return (GetProperty("TopPadding") as float? ?? 0); }
|
||||||
|
set { SetProperty("TopPadding", value); }
|
||||||
|
}
|
||||||
|
public float RightPadding
|
||||||
|
{
|
||||||
|
get { return (GetProperty("RightPadding") as float? ?? 0); }
|
||||||
|
set { SetProperty("RightPadding", value); }
|
||||||
|
}
|
||||||
|
public float LeftPadding
|
||||||
|
{
|
||||||
|
get { return (GetProperty("LeftPadding") as float? ?? 0); }
|
||||||
|
set { SetProperty("LeftPadding", value); }
|
||||||
|
}
|
||||||
|
public float BottomPadding
|
||||||
|
{
|
||||||
|
get { return (GetProperty("BottomPadding") as float? ?? 0); }
|
||||||
|
set { SetProperty("BottomPadding", value); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public enum LBWdCellVerticalAlignment
|
||||||
|
{
|
||||||
|
wdCellAlignVerticalTop = 0,
|
||||||
|
wdCellAlignVerticalCenter = 1,
|
||||||
|
wdCellAlignVerticalBottom = 3
|
||||||
|
}
|
||||||
|
public partial class LBRow : LBComObject
|
||||||
|
{
|
||||||
|
public LBRow() { }
|
||||||
|
public LBRow(Object item) : base(item) { }
|
||||||
|
public float Height
|
||||||
|
{
|
||||||
|
get { return (GetProperty("Height") as float? ?? 0); }
|
||||||
|
set { SetProperty("Height", value); }
|
||||||
|
}
|
||||||
|
public void Select()
|
||||||
|
{
|
||||||
|
InvokeMethod("Select");
|
||||||
|
}
|
||||||
|
}
|
||||||
public partial class LBShape : LBComObject
|
public partial class LBShape : LBComObject
|
||||||
{
|
{
|
||||||
public LBShape() { }
|
public LBShape() { }
|
||||||
@ -1102,6 +1294,44 @@ namespace LBWordLibrary
|
|||||||
wdRevisionsViewFinal = 0,
|
wdRevisionsViewFinal = 0,
|
||||||
wdRevisionsViewOriginal = 1
|
wdRevisionsViewOriginal = 1
|
||||||
}
|
}
|
||||||
|
public partial class LBZoom : LBComObject
|
||||||
|
{
|
||||||
|
public LBZoom() { }
|
||||||
|
public LBZoom(Object item) : base(item) { }
|
||||||
|
public LBWdPageFit PageFit
|
||||||
|
{
|
||||||
|
get { return (LBWdPageFit)GetProperty("PageFit"); }
|
||||||
|
set { SetProperty("PageFit", value); }
|
||||||
|
}
|
||||||
|
public int Percentage
|
||||||
|
{
|
||||||
|
get { return (GetProperty("Percentage") as int? ?? 0); }
|
||||||
|
set { SetProperty("Percentage", value); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public partial class LBColumns : LBComObjectList<LBColumns, LBColumn> /* Collection */
|
||||||
|
{
|
||||||
|
public LBColumns(Object item)
|
||||||
|
{
|
||||||
|
Item = item;
|
||||||
|
}
|
||||||
|
public LBColumn First
|
||||||
|
{
|
||||||
|
get { return new LBColumn(GetProperty("First")); }
|
||||||
|
}
|
||||||
|
public LBColumn Last
|
||||||
|
{
|
||||||
|
get { return new LBColumn(GetProperty("Last")); }
|
||||||
|
}
|
||||||
|
public int Count
|
||||||
|
{
|
||||||
|
get { return (GetProperty("Count") as int? ?? 0); }
|
||||||
|
}
|
||||||
|
public System.Object GetEnumerator()
|
||||||
|
{
|
||||||
|
return InvokeMethod("GetEnumerator");
|
||||||
|
}
|
||||||
|
}
|
||||||
public enum LBWdRelativeHorizontalPosition
|
public enum LBWdRelativeHorizontalPosition
|
||||||
{
|
{
|
||||||
wdRelativeHorizontalPositionMargin = 0,
|
wdRelativeHorizontalPositionMargin = 0,
|
||||||
@ -1124,6 +1354,85 @@ namespace LBWordLibrary
|
|||||||
wdRelativeVerticalPositionInnerMarginArea = 6,
|
wdRelativeVerticalPositionInnerMarginArea = 6,
|
||||||
wdRelativeVerticalPositionOuterMarginArea = 7
|
wdRelativeVerticalPositionOuterMarginArea = 7
|
||||||
}
|
}
|
||||||
|
public enum LBWdPageFit
|
||||||
|
{
|
||||||
|
wdPageFitNone = 0,
|
||||||
|
wdPageFitFullPage = 1,
|
||||||
|
wdPageFitBestFit = 2,
|
||||||
|
wdPageFitTextFit = 3
|
||||||
|
}
|
||||||
|
public partial class LBColumn : LBComObject
|
||||||
|
{
|
||||||
|
public LBColumn() { }
|
||||||
|
public LBColumn(Object item) : base(item) { }
|
||||||
|
public float Width
|
||||||
|
{
|
||||||
|
get { return (GetProperty("Width") as float? ?? 0); }
|
||||||
|
set { SetProperty("Width", value); }
|
||||||
|
}
|
||||||
|
public int Index
|
||||||
|
{
|
||||||
|
get { return (GetProperty("Index") as int? ?? 0); }
|
||||||
|
}
|
||||||
|
public LBColumn Next
|
||||||
|
{
|
||||||
|
get { return new LBColumn(GetProperty("Next")); }
|
||||||
|
}
|
||||||
|
public LBColumn Previous
|
||||||
|
{
|
||||||
|
get { return new LBColumn(GetProperty("Previous")); }
|
||||||
|
}
|
||||||
|
public void SetWidth(float ColumnWidth, LBWdRulerStyle RulerStyle)
|
||||||
|
{
|
||||||
|
InvokeMethod("SetWidth", ColumnWidth, RulerStyle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public enum LBWdRulerStyle
|
||||||
|
{
|
||||||
|
wdAdjustNone = 0,
|
||||||
|
wdAdjustProportional = 1,
|
||||||
|
wdAdjustFirstColumn = 2,
|
||||||
|
wdAdjustSameWidth = 3
|
||||||
|
}
|
||||||
|
public partial class LBCell : LBComObject
|
||||||
|
{
|
||||||
|
public LBCell() { }
|
||||||
|
public LBCell(Object item) : base(item) { }
|
||||||
|
public LBColumn Column
|
||||||
|
{
|
||||||
|
get { return new LBColumn(GetProperty("Column")); }
|
||||||
|
}
|
||||||
|
public LBCell Next
|
||||||
|
{
|
||||||
|
get { return new LBCell(GetProperty("Next")); }
|
||||||
|
}
|
||||||
|
public LBCell Previous
|
||||||
|
{
|
||||||
|
get { return new LBCell(GetProperty("Previous")); }
|
||||||
|
}
|
||||||
|
public LBRow Row
|
||||||
|
{
|
||||||
|
get { return new LBRow(GetProperty("Row")); }
|
||||||
|
}
|
||||||
|
public LBWdCellVerticalAlignment VerticalAlignment
|
||||||
|
{
|
||||||
|
get { return (LBWdCellVerticalAlignment)GetProperty("VerticalAlignment"); }
|
||||||
|
set { SetProperty("VerticalAlignment", value); }
|
||||||
|
}
|
||||||
|
public float Width
|
||||||
|
{
|
||||||
|
get { return (GetProperty("Width") as float? ?? 0); }
|
||||||
|
set { SetProperty("Width", value); }
|
||||||
|
}
|
||||||
|
public LBTables Tables
|
||||||
|
{
|
||||||
|
get { return new LBTables(GetProperty("Tables")); }
|
||||||
|
}
|
||||||
|
public void SetWidth(float ColumnWidth, LBWdRulerStyle RulerStyle)
|
||||||
|
{
|
||||||
|
InvokeMethod("SetWidth", ColumnWidth, RulerStyle);
|
||||||
|
}
|
||||||
|
}
|
||||||
public enum LBWdSaveFormat
|
public enum LBWdSaveFormat
|
||||||
{
|
{
|
||||||
wdFormatDocument = 0,
|
wdFormatDocument = 0,
|
||||||
@ -1305,26 +1614,4 @@ namespace LBWordLibrary
|
|||||||
public LBPictureFormat() { }
|
public LBPictureFormat() { }
|
||||||
public LBPictureFormat(Object item) : base(item) { }
|
public LBPictureFormat(Object item) : base(item) { }
|
||||||
}
|
}
|
||||||
public partial class LBZoom : LBComObject
|
|
||||||
{
|
|
||||||
public LBZoom() { }
|
|
||||||
public LBZoom(Object item) : base(item) { }
|
|
||||||
public LBWdPageFit PageFit
|
|
||||||
{
|
|
||||||
get { return (LBWdPageFit)GetProperty("PageFit"); }
|
|
||||||
set { SetProperty("PageFit", value); }
|
|
||||||
}
|
|
||||||
public int Percentage
|
|
||||||
{
|
|
||||||
get { return (GetProperty("Percentage") as int? ?? 0); }
|
|
||||||
set { SetProperty("Percentage", value); }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public enum LBWdPageFit
|
|
||||||
{
|
|
||||||
wdPageFitNone = 0,
|
|
||||||
wdPageFitFullPage = 1,
|
|
||||||
wdPageFitBestFit = 2,
|
|
||||||
wdPageFitTextFit = 3
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user