如何用R自动生成word文件
office 2007中不能直接打开VB编辑器,请按Alt + F11打开。
import win32com.client # 导入脚本模块 WordApp = win32com.client.Dispatch("Word.Application") # 载入WORD模块
WordApp.Visible = True
# 显示Word应用程序
1、 新建Word文档
doc = WordApp.Documents.Add()
# 新建空文件
doc = WordApp.Documents.Open(r"d:\2011专业考试计划.doc") # 打开指定文档
doc.SaveAs(r"d:\2011专业考试计划.doc")
# 文档保存
doc.Close(-1)
# 保存后关闭,doc.Close()或doc.Close(0)直接关闭不保存
2、 页面设置
doc.PageSetup.PaperSize = 7
# 纸张大小, A3=6, A4=7
doc.PageSetup.PageWidth = 21*28.35 # 直接设置纸张大小, 使用该设置后PaperSize设置取消
doc.PageSetup.PageHeight = 29.7*28.35 # 直接设置纸张大小
doc.PageSetup.Orientation = 1 # 页面方向, 竖直=0, 水平=1 doc.PageSetup.TopMargin = 3*28.35
# 页边距上=3cm,1cm=28.35pt
doc.PageSetup.BottomMargin = 3*28.35 # 页边距下=3cm doc.PageSetup.LeftMargin = 2.5*28.35 # 页边距左=2.5cm doc.PageSetup.RightMargin = 2.5*28.35 # 页边距右=2.5cm
doc.PageSetup.TextColumns.SetCount(2) # 设置页面分栏=2
3、 格式设置
sel = WordApp.Selection
# 获取Selection对象 sel.InsertBreak(8)
# 插入分栏符=8, 分页符=7
sel.Font.Name = "黑体" # 字体 sel.Font.Size = 24 # 字大 sel.Font.Bold = True # 粗体 sel.Font.Italic = True # 斜体 sel.Font.Underline = True
# 下划线
sel.ParagraphFormat.LineSpacing = 2*12 # 设置行距,1行=12磅
sel.ParagraphFormat.Alignment = 1 # 段落对齐,0=左对齐,1=居中,2=右对齐 sel.TypeText("XXXX") # 插入文字 sel.TypeParagraph()
# 插入空行
注:ParagraphFormat属性必须使用TypeParagraph()之后才能二次生效
the underlined word means in chinese
the underlined word means in chinese . 中文译作:下划线单词的汉语意思。句中 underlined为 underline的过去分词,相当于形容词,意思是:下画线的;underline为动词,意思是:在…下面画线;强调。例如:
1、Underline the following that apply to you.
在符合条件的选项下画线。
2、Take two coloured pens and underline the positive and negative words.
用两支彩笔分别在表示肯定和否定意义的词下面画线。
3、The report underlined his concern that standards were at risk.
报告强调了他对道德水准可能会受影响所表示的关注。
underline是什么意思
underline音节划分:under?line 英 [??nd??la?n]美 [??nd?r?la?n]vt.在…下面画线;加强,强调 n.下划线;下期节目预告;图下说明文字过去式: underlined过去分词: underlined现在分词: underlining第三人称单数: underlines 以下是双语例句:1. His failures underline the difference between theatre and film direction. 他的失败说明了导演戏剧和电影是不同的。
来自柯林斯例句2. Please underline the noun clauses in the passage. 请用线画出短文中的名词性从句.来自《简明英汉词典》3. Their brief visit has served to underline the deep differences between the two countries. 他们短暂的访问恰恰凸显了两国间分歧的严重程度。来自柯林斯例句4. Take two coloured pens and underline the positive and negative words. 用两支彩笔分别在表示肯定和否定意义的词下面画线。
来自辞典例句5. Underline the following that apply to you. 在符合自身情况的项下画线。来自辞典例句 前缀:under-1. 表示"在……下"; 2. "副手"; 3. 表示"不足,不够"同缀词adj.underground地下的 (under在……下+ground地→adj.地下的)underdeveloped不发达的 (under不足,不够+develop发展+ed……的→发展不够)undersized不够大的 (under不足,不够+sized大小的→不够大的)adv.underneath在下面 (under在……下+neath下面→adv.在下面 prep.在……的下面)undersea在海底 (under在……下+sea海→adv.在海底)n.underclothing内衣裤 (under在……下+clothing衣服→n.内衣裤)undergraduate大学肄业生,[尚未取得学位的]大学生 (under不足,不够+graduate大学毕业[生]→n.大学肄业生,[尚未取得学位的]大学生;adj.大学生的)underagent副代理人 (under副手+agent代理人→n.副代理人)prep.underneath在……的下面 (under在……下+neath下面→adv.在下面 prep.在……的下面)v.underplay对…轻描淡写 (under不足,不够+play玩→没玩够→说得不够的)underline划线于…下 (under在……下+line线→在字底下划线,引申为强调)underwrite签在……下, 给……保险, 签名, 承诺支付 (under在……下+write写→v.签在……下, 给……保险, 签名, 承诺支付)以下是分词性例句:1.VERB 动词强调;凸显 If one thing, for example an action or an event, underlines another, it draws attention to it and emphasizes its importance. 【语法信息】:V n【语法信息】:V wh【语法信息】:Also V thatThe report underlined his concern that standards were at risk。
报告强调了他对道德水准可能会受影响所表示的关注。The decision to keep him in hospital for a second night underlines the seriousness of his injury。
让他在医院再住一晚的决定表明了其伤势的严重性。But the incident underlines how easily things can go wrong. 但这一事件也突出表明出差错是多么容易。
2.VERB 动词在…下画线 If you underline something such as a word or a sentence, you draw a line underneath it in order to make people notice it or to give it extra importance. 【语法信息】:V nUnderline the following that apply to you。 在符合自身情况的项下画线。
Take two coloured pens and underline the positive and negative words. 用两支彩笔分别在表示肯定和否定意义的词下面画线。
如何在电脑上返回首页
返回上一次页面的快捷键是退格键"Backspace"
系统快捷键
CTRL(Control)组合键
Ctrl + A(All)全选
Ctrl + C(Copy)复制
Ctrl+X 剪切
Ctrl + V 粘贴
Ctrl + S(Save) 保存
仅窗口响应
Ctrl + B (Bold) 字体加粗
Ctrl + I 倾斜
Ctrl + U(Underline)下划线
Ctrl + C(Copy) 复制
Ctrl + D(Design) 设计
Ctrl + E(Center) 居中
Ctrl+ G 定位
Ctrl+F查找
Ctrl + H 替换
Ctrl + K(Hyperlink) 插入链接
Ctrl + L(Left) 左对齐
Ctrl+E 居中
Ctrl+R右对齐
Ctrl + V 粘贴
Ctrl+shift+<; 或 >; 减小 或增大word中选中字体
Ctrl + shift + z 撤销字符格式
转载请注明出处51数据库 » runderlineword