改表格可搜關鍵字詳細自己上網抓。使用過程記憶下來一些關鍵字,基本上是給自己看得紀錄:
1.改文字間距:
ParagraphFormat
.LineRuleWithin = False
.SpaceWithin =
這裡應該是固定行距吧
2.改底色:
.Shape.Fill.ForeColor.RGB = RGB(0, 0, 0)
3.改框線:
.Borders(ppBorderTop)
.Borders(ppBorderBottom)
.Borders(ppBorderLeft)
.Borders(ppBorderRight)
.Weight = 1 '邊框寬度
4.垂直置中:
.Table.Cell(X,Y).Shape.TextFrame
.HorizontalAnchor = msoAnchorCenter
.VerticalAnchor = msoAnchorMiddle
5.改文字邊界,邊KEY用按鈕測試抓數值:
.Shape.TextFrame
.MarginTop = 這裡單位是PT,我只會CM換算PT輸入
.MarginLeft =
.MarginRight =
.MarginBottom =
6.Font改字型那些:
.Name = "應該中文字型名稱"
.NameAscii = "應該英文字型名稱"
.NameOther = "應該英文字型名稱"
.NameFarEast = "應該中文字型名稱"
.Size = 12
.Color = vbBlack
7.單位換算(EXCEL):
8.設置段落/縮排:
ActiveWindow.Selection.ShapeRange(1)
ActiveWindow.Selection.TextRange
.TextFrame.Ruler
.Levels(1).FirstMargin = 0
.Levels(1).LeftMargin = 0 左邊++
+第6點的Font
留言列表