DataForm表达式是必需的。 一个代表 Document 对象的变量。备注将此方法用于邮件合并主文档、邮件合并数据源或任何包含由表格单元格或分隔符分隔的数据的文档。示例当活动文档为邮件合并文档时,本示例将显示"数据表单"对话框。VB 复制 If ActiveDocument.MailMerge.State <> wdNormalDocument Then ActiveDocument.Data...
' Word form fields document. CustomizationContext = ActiveDocument.AttachedTemplate ' Bind the Enter key to the EnterKeyMacro. KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyReturn), _ KeyCategory:=wdKeyCategoryMacro, Command:="EnterKeyMacro" End Sub ...
wordDoc.Paragraphs.Last.Range.Text="我再加一行试试,这里不加'\\n'";//直接添加段,不是覆盖( += )wordDoc.Paragraphs.Last.Range.Text +="不会覆盖的,";//添加在此段的文字后面,不是新段落wordDoc.Paragraphs.Last.Range.InsertAfter("这是后面的内容\n");//将文档的前4个字替换成"哥是替换文字",...
When Word is in form design mode, the Control Toolbox toolbar is displayed. Use this toolbar to insert ActiveX controls such as command buttons, scroll bars, and option buttons. In form design mode, event procedures don't run, and when you click an embedded control, the control's sizing...
(继承自 _Document) Application 返回一个Application对象,该对象表示 Microsoft Word 应用程序。 (继承自 _Document) AttachedTemplate 返回一个 Template 对象,该对象表示附加到指定文档的模板。 (继承自 _Document) AutoFormatOverride 返回或设置一个 boolean 类型的值 ,该值代表是否自动设置格式替代格式设置...
expression。FormFields 表達代表Document物件的變數。 註解 如需傳回集合中單一成員的資訊,請參閱從集合傳回物件。 範例 本範例會將名為 "Text1" 之表單欄位的內容設定為 "Name"。 VB ActiveDocument.FormFields("Text1").Result ="Name" 另請參閱 ...
代表一个文档。Document对象是Documents集合的成员。Documents集合包含 Word 中当前打开的所有Document对象。 备注 使用Documents(索引) (其中index是文档名称或索引号)可返回单个Document对象。 以下示例关闭名为 Report.doc 的文档,而不保存更改。 VB复制 Documents("Report.doc").Close SaveChanges:=wdDoNotSaveChanges ...
A family of Microsoft word processing software products for creating web, email, and print documents.
When you convert a Word document to an InfoPath form template, the resulting form template will closely match the layout of the Word document. In addition, items in the Word document that meet certain conditions are automatically converted to the appropriate controls that u...
Microsoft.Office.Tools.Word.dll, Microsoft.Office.Tools.Word.v4.0.Utilities.dll 显示“数据窗体”对话框,可以在该对话框中添加、删除或修改数据记录。 C# 复制 public void DataForm (); 注解 可以将此方法用于邮件合并main文档、邮件合并数据源或任何包含用表格单元格或分隔符分隔的数据的文档。 适用于 产品...