|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
用VBA方法肯定不如word的效果好。费时费力,位置计算有问题,只能一点一点试效果。
- Function AddTextMainNoteRightNote(Shps As Object)
- Dim Shp ' As Shape
- Dim Str, FontSize
- Str = "测试"
- FontSize = 25
- Set Shp = Shps.AddTextbox(msoTextOrientationHorizontal, 5, 685, 530, FontSize * 100)
- 'Shps.AddTextbox msoTextOrientationHorizontal
- Shp.Name = "MainNote"
- With Shp.TextFrame.TextRange
- .Text = Str
- .Font.Size = FontSize
- .Font.Bold = msoFalse
-
- End With
- With Shp
- .TextFrame.AutoSize = ppAutoSizeNone
- .ShapeStyle = msoShapeStylePreset17
- .Height = FontSize * 2.8
- End With
-
- ''
- FontSize = 15
- Set Shp = Shps.AddTextbox(msoTextOrientationHorizontal, 0, 760, 540, FontSize + 2)
-
- Shp.Name = "RightNote"
- With Shp.TextFrame.TextRange
- .Text = Str
- .Font.Size = FontSize
- .Font.Bold = msoCTrue
- End With
- Shp.TextEffect.Alignment = msoTextEffectAlignmentRight
-
-
- End Function
复制代码
|
|