Add Formatted Text to a Word Document

2016-02-19 09:25 10 1 收藏

生活已是百般艰难,为何不努力一点。下面图老师就给大家分享Add Formatted Text to a Word Document,希望可以让热爱学习的朋友们体会到设计的小小的乐趣。

【 tulaoshi.com - Web开发 】

Demonstration script that displays formatted data in a Microsoft Word document. 
代码如下:

Set objWord = CreateObject("Word.Application")

objWord.Visible = True
Set objDoc = objWord.Documents.Add()
Set objSelection = objWord.Selection

objSelection.Font.Name = "Arial"
objSelection.Font.Size = "18"
objSelection.TypeText "Network Adapter Report"
objSelection.TypeParagraph()

objSelection.Font.Size = "14"
objSelection.TypeText "" & Date()
objSelection.TypeParagraph()



来源:https://www.tulaoshi.com/n/20160219/1590716.html

延伸阅读
标签: Web开发
text-shadow版本:CSS2 兼容性:无 继承性:无 语法: text-shadow : color || length || length || opacity 取值: color : 指定颜色。请参阅 颜色单位 和 附录:颜色表 length : 由浮点数字和单位标识符组成的长度值。可为负值。指定阴影的水平延伸距离。请参阅 长度单位 length : 由浮点数字和单位标识符组成的长度值。可...
标签: Web开发
text-transform版本:CSS1 兼容性:IE4+ NS4+ 继承性:有 语法: text-transform : none | capitalize | uppercase | lowercase 取值: none : 默认值。无转换发生 capitalize : 将每个单词的第一个字母转换成大写,其余无转换发生 uppercase : 转换成大写 lowercase : 转换成小写 说明: 检索或设置对象中的文本的大...
Text文件类型在很多软件中都为一般应用程序与数据库之间架起一座桥梁。你可以使用TextISAM驱动程序和SQL来把Text文件转换成AccessMDB数据库文件,首先,为文本文件创建一个SCHEMA.INI文件。然后,你可以使用下面的代码来实现转换: DimdbAsDatabase,tblasTableDef Setdb=DBEngine.CreateDatabase(App.Path&"mymdb.mdb",dbLangGenera...
标签: Web开发
Cascading Style Sheets: The Definitive Guide, 2nd Edition is a thorough review of all aspects of CSS2.1 and a comprehensive guide to CSS implementation. The book includes new content on positioning, lists and generated content, table layout, user interface, paged media, and more. It explores in detail each individ...
标签: Web开发
要注意的当然是我等jquery菜鸟.$.text()获取的是所有匹配元素的text,要注意的是$.text(val)会把里面的所有东西都删了(包括里面的html标签)再设置text,相当于$.html(val)。官方的说法是“Set the text contents of all matched elements.Similar to html(), but escapes HTML (replace "" and "" with their HTML entities).”。

经验教程

500

收藏

94

精华推荐

CSS:text-decoration

CSS:text-decoration

一行妈

CSS文本:text-indent

CSS文本:text-indent

虹飞天

Just Add食品包装设计欣赏

Just Add食品包装设计欣赏

year九零后少年

微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部