【下载Spire.Doc最新试用版】
【C#】
//实例化一个word Document并添加一个section和段落Document doc = new Document();Section section = doc.AddSection(); Paragraph paragraph = section.AddParagraph();//添加一个Shape,并设置其大小和样式ShapeObject shape = paragraph.AppendShape(240, 60, ShapeType.TextWave);//设置shape的位置shape.VerticalPosition = 80;shape.HorizontalPosition = 100;//写入艺术字文本和设置斜体shape.WordArt.Text = "艺术字效果";shape.WordArt.Italic = true;//设置文字填充样式shape.FillColor = System.Drawing.Color.Red;shape.StrokeColor = System.Drawing.Color.Gray; //保存文档 doc.SaveToFile("Output.docx", FileFormat.Docx2013);
【VB.NET】
Dim doc As New Document()Dim section As Section = doc.AddSection()Dim paragraph As Paragraph = section.AddParagraph()Dim shape As ShapeObject = paragraph.AppendShape(240, 60, ShapeType.TextWave)shape.VerticalPosition = 80shape.HorizontalPosition = 100shape.WordArt.Text = "艺术字效果"shape.WordArt.Italic = Trueshape.FillColor = System.Drawing.Color.Redshape.StrokeColor = System.Drawing.Color.Graydoc.SaveToFile("Output.docx", FileFormat.Docx2013)
效果图:

想看冰蓝更多产品教程吗你推荐:
Spire.PDF系列教程>>
Spire.XLS系列教程>>
想要购买正版授权,或者获取更多Spire.Doc相关信息的朋友可以点击” 咨询在线客服 “~

标签:文档管理Officeword文档处理
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!