對照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");