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



请问用vba,如何选择word文档中第一页的内容


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


请问用vba,如何选择word文档中第一页的内容
发表于:2007-08-13 15:37:45 楼主
如标题,我用一多页的word文档,我想选择第一页的内容
发表于:2007-08-13 17:06:191楼 得分:0
录制宏就知道了.比如我录制的

selection.movedown   unit:=wdscreen,   count:=1,   extend:=wdextend
发表于:2007-08-13 17:16:072楼 得分:0
这个不是的,我把我代码上传
                selection.endkey   unit:=wdstory
                selection.goto   what:=wdgotopage,   which:=wdgotofirst,   count:=pageno   +   1,   name:= " "
                selection.moveup   unit:=wdline,   count:=1
                dstr_endline   =   selection.information(wdfirstcharacterlinenumber)
                selection.goto   what:=wdgotopage,   which:=wdgotofirst,   count:=pageno,   name:= " "
                selection.movedown   unit:=wdline,   count:=dstr_endline,   extend:=wdextend
                pfgetpagecontent   =   selection.text
这段代码我是参照一高人的,但只能选择一页以后的,我选择第一页,只选一行,其中pageno为指定面码


快速检索

最新资讯
热门点击