您的位置:程序门 -> vb -> vba



word字符统计


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


word字符统计[已结贴,结贴人:hmiao]
发表于:2007-08-01 16:10:44 楼主
怎么用vba实现
选择某页文件,
然后统计该页的所有字符数.
发表于:2007-08-01 21:16:301楼 得分:10
sub   ttt()
        msgbox   activedocument.range.characters.count
end   sub
发表于:2007-08-01 23:34:132楼 得分:20
sub   macro1()
        selection.goto   wdgotopage,   wdgotonext,   ,   "10 "
        selection.movedown   wdline,   activedocument.pagesetup.linespage,   wdextend
        msgbox   selection.characters.count
end   sub
发表于:2007-08-02 09:39:593楼 得分:0
假设设置纸张的大小为宽5厘米,高4厘米,
执行:
        selection.goto   wdgotopage,   wdgotonext,   ,   "10 "
        selection.movedown   wdline,   activedocument.pagesetup.linespage,   wdextend
为什么选择的不是第10页的内容,而是多页呢?
怎么样正好选择一页,然后统计该页的字符数
发表于:2007-08-02 11:56:154楼 得分:0
还有,统计文件的页数怎么实现?
发表于:2007-08-03 15:05:145楼 得分:30
文件的页数:
sub   macro1()
msgbox   activedocument.builtindocumentproperties( "number   of   pages ")
end   sub


快速检索

最新资讯
热门点击