当前位置:编程学习 > VB >>

VBS怎么获取word里面的页眉与word文本,在线等



    words.ActiveDocument.ActiveWindow.ActivePane.View.SeekView = 10
    words.Selection.HomeKey 6
    words.Selection.HomeKey 5
    words.Selection.Find.ClearFormatting
    With words.Selection.Find
        .Text = "序號"
        .Replacement.Text = ""
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchByte = True
        .MatchAllWordForms = False
        .MatchSoundsLike = False
        .MatchWildcards = False
        .MatchFuzzy = False
    End With
    words.Selection.Find.Execute
    words.Selection.EndKey 5, 1
    txt = words.selection.range.text
    以上是获取页尾的,求页眉,和word 文本框里的内容怎么获取?急急急急急?
vbs vbs操作word vbs 获取word页眉与word文本 --------------------编程问答-------------------- 在Word2003中开始记录宏,手动完成所需功能,结束记录宏,按Alt+F11键,查看刚才记录的宏对应的VBA代码。
--------------------编程问答-------------------- 不懂啊,我不是学vbs的,所有想请教一下这个问题,因为公司突然要我做这个,郁闷 --------------------编程问答--------------------
     words.ActiveDocument.ActiveWindow.ActivePane.View.SeekView = 1
     words.Selection.EndKey 5, 1
     txt = words.Selection.Range.Text
补充:VB ,  VBA
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,