range.font and range.border
This commit is contained in:
+179
-30
@@ -1,7 +1,7 @@
|
||||
Uses TSDocxEnumerations;
|
||||
|
||||
TestDocuments();
|
||||
|
||||
|
||||
Function TestDocuments();
|
||||
Begin
|
||||
openpath := "D:/temp/vbatable.docx";
|
||||
@@ -17,7 +17,14 @@ Begin
|
||||
println("ActiveDocument.Name = {}", application.ActiveDocument.Name);
|
||||
println("ActiveDocument.Tables.Count = {}", application.ActiveDocument.Tables.Count);
|
||||
|
||||
TestTableCell(application);
|
||||
// TestTableCell(application);
|
||||
// TestTableColumns(application);
|
||||
// TestTables(application);
|
||||
// TestParagraphs(application);
|
||||
// TestRange(application);
|
||||
TestBorders(application);
|
||||
// arr := application.ActiveDocument.Range(0, 10);
|
||||
// println("arr = {}", arr);
|
||||
|
||||
Documents[2].SaveAs2(FileName : savepath);
|
||||
println("savepath = {}", savepath);
|
||||
@@ -26,37 +33,114 @@ return;
|
||||
|
||||
End;
|
||||
|
||||
Function TestRange(application);
|
||||
Begin
|
||||
ActiveDocument := application.ActiveDocument;
|
||||
|
||||
range := ActiveDocument.Range(2, 4);
|
||||
prange := ActiveDocument.Paragraphs(2).Range;
|
||||
crange := ActiveDocument.Tables(1).Cell(1, 1).Range;
|
||||
|
||||
range.Font.Size := 20;
|
||||
prange.Font.Bold := true;
|
||||
crange.Font.Italic := true;
|
||||
|
||||
range.InsertAfter("After");
|
||||
range.InsertBefore("Before");
|
||||
|
||||
prange.InsertAfter(Text: "after.");
|
||||
prange.InsertBefore(Text: "before..");
|
||||
|
||||
crange.InsertAfter(Text: ".after");
|
||||
crange.InsertBefore(Text: ".before");
|
||||
|
||||
return;
|
||||
|
||||
ActiveDocument.Range(2, 17).Font.Size := 20;
|
||||
println("ActiveDocument.Range(2, 4).Font.Size = {}", ActiveDocument.Range(2, 4).Font.Size);
|
||||
println("ActiveDocument.Range(2, 5).Font.Size = {}", ActiveDocument.Range(2, 5).Font.Size);
|
||||
|
||||
// ActiveDocument.Paragraphs(1).Range.Font.Bold := true;
|
||||
// ActiveDocument.Paragraphs(2).Range.Font.Italic := true;
|
||||
// println("ActiveDocument.Paragraphs(1).Range.Font.Bold = {}", ActiveDocument.Paragraphs(1).Range.Font.Bold);
|
||||
// ActiveDocument.Paragraphs(1).Range.Font.NameFarEast := "微软雅黑";
|
||||
// println("ActiveDocument.Paragraphs(1).Range.Font.NameFarEast = {}", ActiveDocument.Paragraphs(1).Range.Font.NameFarEast);
|
||||
// ActiveDocument.Paragraphs(1).Range.Font.Size := 20;
|
||||
// println("ActiveDocument.Paragraphs(1).Range.Font.Size = {}", ActiveDocument.Paragraphs(1).Range.Font.Size);
|
||||
// ActiveDocument.Paragraphs(1).Range.Font.Italic := true;
|
||||
// println("ActiveDocument.Paragraphs(1).Range.Font.Italic = {}", ActiveDocument.Paragraphs(1).Range.Font.Italic);
|
||||
// ActiveDocument.Paragraphs(1).Range.Font.Name := "宋体";
|
||||
// println("ActiveDocument.Paragraphs(1).Range.Font.Name = {}", ActiveDocument.Paragraphs(1).Range.Font.Name);
|
||||
// ActiveDocument.Paragraphs(1).Range.Font.AllCaps := true;
|
||||
// println("ActiveDocument.Paragraphs(1).Range.Font.AllCaps = {}", ActiveDocument.Paragraphs(1).Range.Font.AllCaps);
|
||||
// ActiveDocument.Paragraphs(1).Range.Font.Underline := TSDocxEnumerations.wdUnderlineDash();
|
||||
// println("ActiveDocument.Paragraphs(1).Range.Font.Underline = {}", ActiveDocument.Paragraphs(1).Range.Font.Underline);
|
||||
// ActiveDocument.Paragraphs(1).Range.Font.UnderlineColor := TSDocxEnumerations.wdColorLime();
|
||||
// println("ActiveDocument.Paragraphs(1).Range.Font.UnderlineColor = {}", ActiveDocument.Paragraphs(1).Range.Font.UnderlineColor);
|
||||
// ActiveDocument.Paragraphs(1).Range.Font.Reset();
|
||||
|
||||
ActiveDocument.Tables(1).Cell(1, 1).Range.Font.Bold := true;
|
||||
// println("ActiveDocument.Tables(1).Cell(1, 1).Range.Font.Bold = {}", ActiveDocument.Tables(1).Cell(1, 1).Range.Font.Bold);
|
||||
// ActiveDocument.Tables(1).Cell(1, 1).Range.Font.NameFarEast := "微软雅黑";
|
||||
// println("ActiveDocument.Tables(1).Cell(1, 1).Range.Font.NameFarEast = {}", ActiveDocument.Tables(1).Cell(1, 1).Range.Font.NameFarEast);
|
||||
// ActiveDocument.Tables(1).Cell(1, 1).Range.Font.Size := 30;
|
||||
// println("ActiveDocument.Tables(1).Cell(1, 1).Range.Font.Size = {}", ActiveDocument.Tables(1).Cell(1, 1).Range.Font.Size);
|
||||
// ActiveDocument.Tables(1).Cell(1, 1).Range.Font.Italic := true;
|
||||
// println("ActiveDocument.Tables(1).Cell(1, 1).Range.Font.Italic = {}", ActiveDocument.Tables(1).Cell(1, 1).Range.Font.Italic);
|
||||
// ActiveDocument.Tables(1).Cell(1, 1).Range.Font.Name := "宋体";
|
||||
// println("ActiveDocument.Tables(1).Cell(1, 1).Range.Font.Name = {}", ActiveDocument.Tables(1).Cell(1, 1).Range.Font.Name);
|
||||
// ActiveDocument.Tables(1).Cell(1, 1).Range.Font.AllCaps := true;
|
||||
// println("ActiveDocument.Tables(1).Cell(1, 1).Range.Font.AllCaps = {}", ActiveDocument.Tables(1).Cell(1, 1).Range.Font.AllCaps);
|
||||
// ActiveDocument.Tables(1).Cell(1, 1).Range.Font.Underline := TSDocxEnumerations.wdUnderlineSingle();
|
||||
// println("ActiveDocument.Tables(1).Cell(1, 1).Range.Font.Underline = {}", ActiveDocument.Tables(1).Cell(1, 1).Range.Font.Underline);
|
||||
// ActiveDocument.Tables(1).Cell(1, 1).Range.Font.UnderlineColor := TSDocxEnumerations.wdColorBlue();
|
||||
// println("ActiveDocument.Tables(1).Cell(1, 1).Range.Font.UnderlineColor = {}", ActiveDocument.Tables(1).Cell(1, 1).Range.Font.UnderlineColor);
|
||||
// ActiveDocument.Tables(1).Cell(1, 1).Range.Font.Reset();
|
||||
ActiveDocument.Tables(1).Cell(1, 1).Range.InsertAfter(Text:="111");
|
||||
ActiveDocument.Tables(1).Cell(1, 1).Range.InsertBefore("before");
|
||||
|
||||
End;
|
||||
|
||||
Function TestParagraphs(application);
|
||||
Begin
|
||||
println(">>>>>>>>>>>>>>>>>>>>>> TestParagraphs");
|
||||
ActiveDocument := application.ActiveDocument;
|
||||
println("ActiveDocument.Paragraphs.Count = {}", ActiveDocument.Paragraphs.Count);
|
||||
ActiveDocument.Paragraphs(1).Range.Font.Bold := true;
|
||||
End;
|
||||
|
||||
Function TestTables(application);
|
||||
Begin
|
||||
ActiveDocument := application.ActiveDocument;
|
||||
// ActiveDocument.Tables(1).ApplyStyleDirectFormatting('样式1');
|
||||
tables := application.ActiveDocument.Tables();
|
||||
// tables[1].AutoFitBehavior(TSDocxEnumerations.wdAutoFitContent());
|
||||
tables[1].AutoFitBehavior(TSDocxEnumerations.wdAutoFitWindow());
|
||||
End;
|
||||
|
||||
Function TestTableCell(application);
|
||||
Begin
|
||||
ActiveDocument := application.ActiveDocument;
|
||||
// tables := application.ActiveDocument.Tables;
|
||||
// tables[1].AutoFitBehavior(class(TSDocxEnumerations).wdAutoFitContent());
|
||||
// tables[1].Cell(1, 1).Delete(class(TSDocxEnumerations).wdDeleteCellsEntireColumn());
|
||||
// tables[1].Cell(1, 1).Delete(class(TSDocxEnumerations).wdDeleteCellsEntireRow());
|
||||
// tables[1].Cell(3, 3).Delete(class(TSDocxEnumerations).wdDeleteCellsShiftLeft());
|
||||
// tables[1].Cell(1, 2).Delete(class(TSDocxEnumerations).wdDeleteCellsShiftUp());
|
||||
// tables[1].Cell(5, 3).Delete(class(TSDocxEnumerations).wdDeleteCellsShiftUp());
|
||||
// tables[1].Cell(1, 1).Delete(TSDocxEnumerations.wdDeleteCellsEntireColumn());
|
||||
// tables[1].Cell(1, 1).Delete(TSDocxEnumerations.wdDeleteCellsEntireRow());
|
||||
// tables[1].Cell(3, 3).Delete(TSDocxEnumerations.wdDeleteCellsShiftLeft());
|
||||
// tables[1].Cell(1, 2).Delete(TSDocxEnumerations.wdDeleteCellsShiftUp());
|
||||
// tables[1].Cell(5, 3).Delete(TSDocxEnumerations.wdDeleteCellsShiftUp());
|
||||
// tables2 := ActiveDocument.Tables(2);
|
||||
// tables2.Cell(1, 1).Delete(class(TSDocxEnumerations).wdDeleteCellsEntireColumn());
|
||||
// tables2.Cell(1, 1).Delete(class(TSDocxEnumerations).wdDeleteCellsEntireRow());
|
||||
// tables2.Cell(3, 3).Delete(class(TSDocxEnumerations).wdDeleteCellsShiftLeft());
|
||||
// tables2.Cell(1, 2).Delete(class(TSDocxEnumerations).wdDeleteCellsShiftUp());
|
||||
// tables2.Cell(5, 3).Delete(class(TSDocxEnumerations).wdDeleteCellsShiftUp());
|
||||
// tables2.Cell(1, 1).Delete(TSDocxEnumerations.wdDeleteCellsEntireColumn());
|
||||
// tables2.Cell(1, 1).Delete(TSDocxEnumerations.wdDeleteCellsEntireRow());
|
||||
// tables2.Cell(3, 3).Delete(TSDocxEnumerations.wdDeleteCellsShiftLeft());
|
||||
// tables2.Cell(1, 2).Delete(TSDocxEnumerations.wdDeleteCellsShiftUp());
|
||||
// tables2.Cell(5, 3).Delete(TSDocxEnumerations.wdDeleteCellsShiftUp());
|
||||
// ActiveDocument.Tables(1).Cell(Row: 2, Column: 2).Merge(MergeTo: tables[1].Cell(2, 4));
|
||||
// ActiveDocument.Tables(2).Cell(2, 2).Merge(ActiveDocument.Tables(2).Cell(3, 4));
|
||||
// ActiveDocument.Tables(2).Cell(2, 2).Width := 100;
|
||||
// println("ActiveDocument.Tables(2).Cell(2, 2).Width = {}", ActiveDocument.Tables(2).Cell(2, 2).Width);
|
||||
// ActiveDocument.Tables(2).Cell(2, 3).WordWrap := true;
|
||||
// println("ActiveDocument.Tables(2).Cell(2, 3).WordWrap = {}", ActiveDocument.Tables(2).Cell(2, 3).WordWrap);
|
||||
// ActiveDocument.Tables(2).Cell(1, 1).VerticalAlignment := class(TSDocxEnumerations).wdCellAlignVerticalBottom();
|
||||
// ActiveDocument.Tables(2).Cell(1, 2).VerticalAlignment := class(TSDocxEnumerations).wdCellAlignVerticalCenter();
|
||||
// ActiveDocument.Tables(2).Cell(2, 2).VerticalAlignment := class(TSDocxEnumerations).wdCellAlignVerticalTop();
|
||||
// ActiveDocument.Tables(2).Cell(1, 1).VerticalAlignment := TSDocxEnumerations.wdCellAlignVerticalBottom();
|
||||
// ActiveDocument.Tables(2).Cell(1, 2).VerticalAlignment := TSDocxEnumerations.wdCellAlignVerticalCenter();
|
||||
// ActiveDocument.Tables(2).Cell(2, 2).VerticalAlignment := TSDocxEnumerations.wdCellAlignVerticalTop();
|
||||
// println("ActiveDocument.Tables(2).Cell(1, 1).VerticalAlignment = {}", ActiveDocument.Tables(2).Cell(1, 1).VerticalAlignment);
|
||||
// println("ActiveDocument.Tables(2).Cell(1, 2).VerticalAlignment = {}", ActiveDocument.Tables(2).Cell(1, 2).VerticalAlignment);
|
||||
// println("ActiveDocument.Tables(2).Cell(1, 3).VerticalAlignment = {}", ActiveDocument.Tables(2).Cell(1, 3).VerticalAlignment);
|
||||
@@ -69,15 +153,42 @@ Begin
|
||||
// println("ActiveDocument.Tables(2).Cell(1, 1).LeftPadding = {}", ActiveDocument.Tables(2).Cell(1, 1).LeftPadding);
|
||||
// println("ActiveDocument.Tables(2).Cell(1, 1).BottomPadding = {}", ActiveDocument.Tables(2).Cell(1, 1).BottomPadding);
|
||||
// println("ActiveDocument.Tables(2).Cell(1, 1).RightPadding = {}", ActiveDocument.Tables(2).Cell(1, 1).RightPadding);
|
||||
// ActiveDocument.Tables(2).Cell(3, 3).Tables(1).AutoFitBehavior(class(TSDocxEnumerations).wdAutoFitContent());
|
||||
// ActiveDocument.Tables(2).Cell(3, 3).Tables(1).Cell(1, 1).Delete(class(TSDocxEnumerations).wdDeleteCellsEntireColumn());
|
||||
// ActiveDocument.Tables(1).Cell(1, 1).Shading.Texture := class(TSDocxEnumerations).wdTextureHorizontal();
|
||||
ActiveDocument.Tables(3).Cell(2,1).PreferredWidthType := class(TSDocxEnumerations).wdPreferredWidthAuto;
|
||||
ActiveDocument.Tables(3).Cell(2,2).PreferredWidth := 1000;
|
||||
println("ActiveDocument.Tables(3).Cell(2,2).PreferredWidth = {}", ActiveDocument.Tables(3).Cell(2,2).PreferredWidth);
|
||||
// ActiveDocument.Tables(2).Cell(3, 3).Tables(1).AutoFitBehavior(TSDocxEnumerations.wdAutoFitContent());
|
||||
// ActiveDocument.Tables(2).Cell(3, 3).Tables(1).Cell(1, 1).Delete(TSDocxEnumerations.wdDeleteCellsEntireColumn());
|
||||
// ActiveDocument.Tables(1).Cell(1, 1).Shading.Texture := TSDocxEnumerations.wdTextureHorizontal();
|
||||
// ActiveDocument.Tables(3).Cell(2,1).PreferredWidthType := TSDocxEnumerations.wdPreferredWidthAuto;
|
||||
// ActiveDocument.Tables(3).Cell(2,2).PreferredWidth := 1000;
|
||||
// println("ActiveDocument.Tables(3).Cell(2,2).PreferredWidth = {}", ActiveDocument.Tables(3).Cell(2,2).PreferredWidth);
|
||||
// ActiveDocument.Tables(3).Cell(2,1).SetHeight(RowHeight:=100, HeightRule:=TSDocxEnumerations.wdRowHeightAtLeast);
|
||||
// ActiveDocument.Tables(3).Cell(2,1).HeightRule := TSDocxEnumerations.wdRowHeightExactly();
|
||||
// ActiveDocument.Tables(3).Cell(2,1).Height := 30;
|
||||
// println("ActiveDocument.Tables(3).Cell(2,1).Height = {}", ActiveDocument.Tables(3).Cell(2,1).Height);
|
||||
// println("ActiveDocument.Tables(3).Cell(2,1).HeightRule = {}", ActiveDocument.Tables(3).Cell(2,1).HeightRule);
|
||||
// println("ActiveDocument.Tables(3).Cell(1,4).Next.ColumnIndex = {}", ActiveDocument.Tables(3).Cell(1,4).Next.ColumnIndex);
|
||||
// println("ActiveDocument.Tables(3).Cell(1,4).Next.RowIndex = {}", ActiveDocument.Tables(3).Cell(1,4).Next.RowIndex);
|
||||
// println("ActiveDocument.Tables(3).Cell(2,4).Next.ColumnIndex = {}", ActiveDocument.Tables(3).Cell(2,4).Next);
|
||||
// println("ActiveDocument.Tables(3).Cell(1,1).Previous.ColumnIndex = {}", ActiveDocument.Tables(3).Cell(1,1).Previous);
|
||||
// println("ActiveDocument.Tables(3).Cell(2,1).Previous.ColumnIndex = {}", ActiveDocument.Tables(3).Cell(2,1).Previous.ColumnIndex);
|
||||
// println("ActiveDocument.Tables(3).Cell(2,1).Previous.RowIndex = {}", ActiveDocument.Tables(3).Cell(2,1).Previous.RowIndex);
|
||||
|
||||
End;
|
||||
|
||||
Function TestTableColumns(application);
|
||||
Begin
|
||||
ActiveDocument := application.ActiveDocument;
|
||||
ActiveDocument.Tables(1).Columns(1).SetWidth(100, TSDocxEnumerations.wdAdjustSameWidth());
|
||||
ActiveDocument.Tables(3).Columns(2).PreferredWidthType := TSDocxEnumerations.wdPreferredWidthPercent();
|
||||
ActiveDocument.Tables(3).Columns(2).PreferredWidth := 50;
|
||||
println("ActiveDocument.Tables(3).Columns(2).PreferredWidth = {}", ActiveDocument.Tables(3).Columns(2).PreferredWidth);
|
||||
println("ActiveDocument.Tables(3).Columns.Count = {}", ActiveDocument.Tables(3).Columns.Count);
|
||||
println("ActiveDocument.Tables(3).Rows.Count = {}", ActiveDocument.Tables(3).Rows.Count);
|
||||
println("ActiveDocument.Tables(3).Cell(1,2).Width = {}", ActiveDocument.Tables(3).Cell(1,2).Width);
|
||||
println("ActiveDocument.Tables(2).Cell(1,2).Width = {}", ActiveDocument.Tables(2).Cell(1,2).Width);
|
||||
ActiveDocument.Tables(1).Cell(1, 2).PreferredWidthType := TSDocxEnumerations.wdPreferredWidthPercent();
|
||||
ActiveDocument.Tables(1).Cell(1, 2).Width := 100;
|
||||
println("ActiveDocument.Tables(1).Cell(1,2).Width = {}", ActiveDocument.Tables(1).Cell(1,2).Width);
|
||||
End;
|
||||
|
||||
Function TestTableRows();
|
||||
Begin
|
||||
// ActiveDocument.Tables(1).Rows.WrapAroundText := true;
|
||||
@@ -88,14 +199,52 @@ Begin
|
||||
// println("Tables(1).Rows.WrapAroundText = {}", ActiveDocument.Tables(1).Rows.WrapAroundText);
|
||||
End;
|
||||
|
||||
Function TestTableBorders();
|
||||
Function TestBorders(application);
|
||||
Begin
|
||||
// ActiveDocument.Tables(1).Borders(class(TSDocxEnumerations).wdBorderDiagonalUp).LineStyle := class(TSDocxEnumerations).wdLineStyleSingle;
|
||||
// ActiveDocument.Tables(1).Cell(1, 1).Borders(class(TSDocxEnumerations).wdBorderDiagonalDown).LineStyle := class(TSDocxEnumerations).wdLineStyleSingle;
|
||||
// ActiveDocument.Tables(1).Columns(1).SetWidth(100, class(TSDocxEnumerations).wdAdjustSameWidth());
|
||||
// ActiveDocument.Tables(3).Columns(2).PreferredWidthType := class(TSDocxEnumerations).wdPreferredWidthPercent;
|
||||
// ActiveDocument.Tables(3).Columns(2).PreferredWidth := 50;
|
||||
// println("ActiveDocument.Tables(3).Columns(2).PreferredWidth = {}", ActiveDocument.Tables(3).Columns(2).PreferredWidth);
|
||||
ActiveDocument := application.ActiveDocument;
|
||||
println("\n============== Start TestBorders ==============");
|
||||
println("Tables(1) will set LineStyle = {}, color = {}", TSDocxEnumerations.wdLineStyleSingle(), TSDocxEnumerations.wdColorLime());
|
||||
ActiveDocument.Tables(1).Borders(TSDocxEnumerations.wdBorderDiagonalUp()).LineStyle := TSDocxEnumerations.wdLineStyleSingle();
|
||||
ActiveDocument.Tables(1).Borders(TSDocxEnumerations.wdBorderDiagonalUp()).Color := TSDocxEnumerations.wdColorLime();
|
||||
println("ActiveDocument.Tables(1).Borders(TSDocxEnumerations.wdBorderDiagonalUp()).LineStyle = {}", ActiveDocument.Tables(1).Borders(TSDocxEnumerations.wdBorderDiagonalUp()).LineStyle);
|
||||
println("ActiveDocument.Tables(1).Borders(TSDocxEnumerations.wdBorderDiagonalUp()).Color := {}", ActiveDocument.Tables(1).Borders(TSDocxEnumerations.wdBorderDiagonalUp()).Color);
|
||||
println("\n");
|
||||
|
||||
println("Tables(1).Cell(1, 1) will set LineStyle = {}, LineWidth = {}", TSDocxEnumerations.wdLineStyleDot(), TSDocxEnumerations.wdLineWidth025pt());
|
||||
ActiveDocument.Tables(1).Cell(1, 1).Borders(TSDocxEnumerations.wdBorderDiagonalDown()).LineStyle := TSDocxEnumerations.wdLineStyleDot();
|
||||
ActiveDocument.Tables(1).Cell(1, 1).Borders(TSDocxEnumerations.wdBorderDiagonalDown()).LineWidth := TSDocxEnumerations.wdLineWidth025pt();
|
||||
println("ActiveDocument.Tables(1).Cell(1, 1).Borders(TSDocxEnumerations.wdBorderDiagonalDown()).LineStyle = {}", ActiveDocument.Tables(1).Cell(1, 1).Borders(TSDocxEnumerations.wdBorderDiagonalDown()).LineStyle);
|
||||
println("ActiveDocument.Tables(1).Cell(1, 1).Borders(TSDocxEnumerations.wdBorderDiagonalDown()).LineWidth = {}", ActiveDocument.Tables(1).Cell(1, 1).Borders(TSDocxEnumerations.wdBorderDiagonalDown()).LineWidth);
|
||||
println("\n");
|
||||
|
||||
println("Range(2, 4) will set LineStyle = {}, ColorIndex = {}", TSDocxEnumerations.wdLineStyleTriple(), TSDocxEnumerations.wdBlue());
|
||||
ActiveDocument.Range(2, 4).Borders(TSDocxEnumerations.wdBorderBottom()).LineStyle := TSDocxEnumerations.wdLineStyleTriple();
|
||||
ActiveDocument.Range(2, 4).Borders(TSDocxEnumerations.wdBorderBottom()).ColorIndex := TSDocxEnumerations.wdBlue();
|
||||
println("ActiveDocument.Range(2, 4).Borders(TSDocxEnumerations.wdBorderBottom()).LineStyle = {}", ActiveDocument.Range(2, 4).Borders(TSDocxEnumerations.wdBorderBottom()).LineStyle);
|
||||
println("ActiveDocument.Range(2, 4).Borders(TSDocxEnumerations.wdBorderBottom()).ColorIndex = {}", ActiveDocument.Range(2, 4).Borders(TSDocxEnumerations.wdBorderBottom()).ColorIndex);
|
||||
println("\n");
|
||||
|
||||
println("Paragraphs(2).Range will set LineStyle = {}", TSDocxEnumerations.wdLineStyleDouble());
|
||||
ActiveDocument.Paragraphs(2).Range.Borders(TSDocxEnumerations.wdBorderLeft()).LineStyle := TSDocxEnumerations.wdLineStyleDouble();
|
||||
println("ActiveDocument.Paragraphs(2).Range.Borders(TSDocxEnumerations.wdBorderLeft()).LineStyle = {}", ActiveDocument.Paragraphs(2).Range.Borders(TSDocxEnumerations.wdBorderLeft()).LineStyle);
|
||||
println("\n");
|
||||
|
||||
println("Tables(1).Range wdBorderDiagonalUp will set LineStyle = {}", TSDocxEnumerations.wdLineStyleOutset());
|
||||
println("Tables(1).Range wdBorderBottom will set LineStyle = {}", TSDocxEnumerations.wdLineStyleDashSmallGap());
|
||||
ActiveDocument.Tables(1).Range.Borders(TSDocxEnumerations.wdBorderDiagonalUp()).LineStyle := TSDocxEnumerations.wdLineStyleOutset();
|
||||
ActiveDocument.Tables(1).Range.Borders(TSDocxEnumerations.wdBorderBottom()).LineStyle := TSDocxEnumerations.wdLineStyleDashSmallGap();
|
||||
println("ActiveDocument.Tables(1).Range.Borders(TSDocxEnumerations.wdBorderDiagonalUp()).LineStyle = {}", ActiveDocument.Tables(1).Range.Borders(TSDocxEnumerations.wdBorderDiagonalUp()).LineStyle);
|
||||
println("ActiveDocument.Tables(1).Range.Borders(TSDocxEnumerations.wdBorderBottom()).LineStyle = {}", ActiveDocument.Tables(1).Range.Borders(TSDocxEnumerations.wdBorderBottom()).LineStyle);
|
||||
println("\n");
|
||||
|
||||
println("Tables(1).Cell(1, 1).Range wdBorderVertical will set LineStyle = {}", TSDocxEnumerations.wdLineStyleEmboss3D());
|
||||
println("Tables(1).Cell(1, 1).Range wdBorderDiagonalDown will set LineStyle = {}", TSDocxEnumerations.wdLineStyleEngrave3D());
|
||||
ActiveDocument.Tables(1).Cell(1, 1).Range.Borders(TSDocxEnumerations.wdBorderVertical()).LineStyle := TSDocxEnumerations.wdLineStyleEmboss3D();
|
||||
ActiveDocument.Tables(1).Cell(1, 1).Range.Borders(TSDocxEnumerations.wdBorderDiagonalDown()).LineStyle := TSDocxEnumerations.wdLineStyleEngrave3D();
|
||||
println("ActiveDocument.Tables(1).Cell(1, 1).Range.Borders(TSDocxEnumerations.wdBorderVertical()).LineStyle = {}", ActiveDocument.Tables(1).Cell(1, 1).Range.Borders(TSDocxEnumerations.wdBorderVertical()).LineStyle);
|
||||
println("ActiveDocument.Tables(1).Cell(1, 1).Range.Borders(TSDocxEnumerations.wdBorderDiagonalDown()).LineStyle = {}", ActiveDocument.Tables(1).Cell(1, 1).Range.Borders(TSDocxEnumerations.wdBorderDiagonalDown()).LineStyle);
|
||||
println("============== End TestBorders ==============\n");
|
||||
|
||||
End;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user