如果文档中的代码表格时,感觉还是很快速有用的. Sub HangHao() ' ' hanghao 宏 ' ' Dim parag As Paragraph Dim nLineNum: nLineNum = 0 Dim selRge As Range Set selRge = Selection.Range For Each parag In Selection.Paragraphs nLineNum = nLineNum + 1 bgNLineNum = nLineNum selRge.Par
表 20‑1到表 20‑8是VBA编程中使用频率最高的英文单词,按字母排序.词性列中,a表示形容词,n表示名词,v表示动词,p表示介词以及其他词性. 表 20‑1 VBA编程常用词汇表 单词 中文 词性 单词 中文 词性 单词 中文 词性 Absolute 绝对 a Area 区域 n Book 书 n Accelerator 加速器 n Areas 区域 n Boolean 布尔 n Access 访问 v Arg 参数 n Border 边框 n Action 动作 n Array 数组 n
在主要的编程语言中, 结构体是用大括号来表示 代码段的 范围 界定的. 但是在一些比较"老的"语言中,由于历史原因, 还是使用的 是: 关键字来进行界定代码 的 结构段, 如vba中的 语法结构: if .. . then ... end if, if .... then ... else ... end if; if .... then .... elseif .... then .... elseif .... then.... end if for i=1 to 10 ... e
使用VB可以将表外的字体设置标题字体实际操作如下: VB代码如下: Sub oliver_1() Selection.EndKey Unit:=wdStory '光标移到文末 To ActiveDocument.Tables.Count '有几个表格,下面操作就循环几次 With Application.Browser .Target = wdBrowseTable '插入点在表格中 .Previous '插入点移至前一张表格之前 End With Selection.MoveUp Unit:=