对照vba脚本
3 4 5 6 7 8 9 10 |
Sub QQ1722187970() Dim oDoc As Document Set oDoc = Word.ActiveDocument oDoc.ConvertNumbersToText Dim oList As List Debug.Print oDoc.Lists.Count For Each oList In oDoc.Lists oList.ConvertNumbersToText Next |
可以知道使用jacob直接使用document 调用call命令ConvertNumbersToText //初始化office插件 this.word = new ActiveXComponent("Word.Application"); //初始化文档窗口 this.documents = this.word.getProperty("Documents").toDispatch();
//初始化当前工作窗口
this.document = Dispatch.call(documents, "Add").toDispatch();
//对当前窗口中所有自动的编号转文本处理
Dispatch.call(this.document, "ConvertNumbersToText");