回复 2楼iceman的帖子
您好,
因在測試新工具繁體中文是否可以完全正常顯示,但結果如我PO的表格一樣,"會"字顯示不出來且跳欄位囷擾,再麻煩,謝謝!!
Sample Code 如下:
With vp
.StartDoc
' show intro
.Paragraph = "VSPrinter has more powerful tables than previous versions. " & vbCrLf & _
"New features include breaking rows across pages, vertical text " & _
"in cells, row spanning, customizable borders, and better events " & _
"to allow custom painting." & vbCrLf & vbCrLf
' set page and table borders
.PageBorder = pbAll
.TableBorder = Val(cmbBorders)
.TablePenLR = 40
.TablePenTB = 40
' build table with 10 rows
.StartTable
.AddTable "2300|2300|2300", "會計|行政|業務", "", RGB(200, 200, 250)
.TableCell(tcRows) = 10
' center align all cells
.TableCell(tcAlign) = taCenterMiddle
' add text to all cells
Dim row%, col%
For row = 1 To 10
For col = 1 To 3
If (row + col) Mod 7 <> 0 Then
.TableCell(tcText, row, col) = " Row " & row & " Col " & col & " "
Else
' make a few cells have longer text, bold with a background
.TableCell(tcText, row, col) = sLong
.TableCell(tcBackColor, row, col) = RGB(100, 250, 100)
.TableCell(tcFontBold, row, col) = True
End If
Next
Next
' keep rows together
.TableCell(tcRowKeepTogether) = chkKeepTogether.Value
' apply vertical text to first row
If chkVerticalText.Value Then
.TableCell(tcVertical, 1, 1, 1, 3) = True
End If
' apply colspan
If chkColSpan.Value Then
.TableCell(tcColSpan, 1, 1) = 2
.TableCell(tcBackColor, 1, 1) = RGB(250, 100, 100)
End If
' apply rowspan
If chkRowSpan.Value Then
.TableCell(tcRowSpan, 6, 1) = 2
.TableCell(tcRowSpan, 3, 2) = 2
.TableCell(tcBackColor, 3, 2) = RGB(250, 100, 100)
End If
' apply custom borders
If chkCustomBorders.Value Then
.TableCell(tcRowBorderAbove, 2) = 80
.TableCell(tcRowBorderBelow, 2) = 80
.TableCell(tcRowBorderColor, 2) = RGB(0, 0, 100)
.TableCell(tcColBorderLeft, , 2) = 40
.TableCell(tcColBorderRight, , 2) = 40
.TableCell(tcColBorderColor, , 2) = RGB(0, 100, 0)
End If
.EndTable
.EndDoc
End With |