Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共6 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:WordCreator 字体不变化

1楼
shanshuizhujian 发表于:2025/3/28 15:49:00
Dim wdc As New WordCreator()
Dim fl As String = "c:\temp\test.docx"
Dim fnt As New Font("黑体", 15)
wdc.AddParagraph("Foxtable是什么?")
wdc.AddParagraph("Foxtable是电子表格", fnt)
wdc.AddParagraph("Foxtable也是数据库", fnt, color.RosyBrown)
wdc.AddParagraph("Foxtable是一个优秀的应用软件", fnt, Color.Red, Word.RtfHorizontalAlignment.Center)
wdc.AddParagraph("Foxtable也是一个高效率的开发工具", fnt, Color.Green, Word.RtfHorizontalAlignment.Right)
wdc.Save(fl) '保存文件
Process.Start(fl) '打开文件  
word字体还是宋体。
2楼
有点蓝 发表于:2025/3/28 15:54:00
WordCreator不支持改字体
3楼
shanshuizhujian 发表于:2025/3/28 15:55:00
只能使用宋体吗?
4楼
shanshuizhujian 发表于:2025/3/28 15:56:00
Dim wdc As New WordCreator()
Dim
fl As String = "c:\temp\test.docx"
Dim
txt As String
For
i As Integer = 1 To 5
    txt = txt &
"Foxtable不仅是一个优秀的应用软件,同时又是一个高效率的开发工具。"
Next
With
wdc.AddParagraph(txt)
    .ForeColor = Color.Green
    .Font =
New Font("微软雅黑", 9)
    .FirstLineIndent = 20  
'首行缩进20
    .SpaceBetweenLines = 10
'行距为10
    .Alignment = Word.RtfHorizontalAlignment.Justify
'文本两端对齐

End
With
wdc.Save(fl)
Process.Start(fl)  
这个是示例代码,显示不是微软雅黑,还是宋体。 
5楼
有点蓝 发表于:2025/3/28 16:02:00
只能使用宋体
6楼
shanshuizhujian 发表于:2025/3/28 16:10:00
我测试了,加上第三个参数之后,发现英文的可以变化,中文的无法变化。
共6 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .02734 s, 2 queries.