• 2716阅读
  • 1回复

QT active word  获得当前页码 [复制链接]

上一主题 下一主题
离线zoemolly
 

只看楼主 倒序阅读 楼主  发表于: 2015-06-04

VBA示例


本示例显示当前页码和活动文档的总页数。MsgBox "The selection is on page " & _Selection.Information(wdActiveEndPageNumber) & " of page " _& Selection.Information(wdNumberOfPagesInDocument)
QT 中该怎么写啊。。  
QAxObject *page = document->querySubObject("BuiltInDocumentProperties");
QAxObject *page2 = document->querySubObject("BuiltInDocumentProperties(wdPropertyPages)");
if(!page->isNull())
{
      QString  DD1 = page->dynamicCall("wdPropertyPages").toString();
      QString  DD2 = page->property("wdPropertyPages").toString();
      QString  DD3 = page2->dynamicCall("wdPropertyPages").toString();
      QString  DD4 = page2->property("wdPropertyPages").toString();
      QString  DD5 = page->dynamicCall("wdActiveEndPageNumber").toString();
      QString  DD6 = page->property("wdActiveEndPEndPageNumber").toString();
     QString  DD7 = page2->dynamicCall("wdActiveEndPageNumber").toString();
      QString  DD8 = page2->property("wdActiveEndPageNumber").toString();
}  
上面这些这种都不对。。。。。。
离线zoemolly

只看该作者 1楼 发表于: 2015-06-04
快速回复
限100 字节
 
上一个 下一个