如题

解决方案 »

  1.   

    仅供参考
    ?"begin...";: _
    Set fs = CreateObject("Scripting.FileSystemObject"): _
    Set a = fs.CreateTextFile("c:\alltext.txt", True): _
    for each page in ThisDocument.Pages: _
        a.WriteLine("----页:"+page.name+"----"): _
        for each shape in page.Shapes: _
            a.WriteLine(shape.Text): _
        next: _
    next: _
    a.Close: _
    Set a=Nothing: _
    Set fs=Nothing: _
    ?"end"
      

  2.   

    Set fs = CreateObject("Scripting.FileSystemObject")
    Set a = fs.CreateTextFile("c:\alltext.txt", True)
    for each page in ThisDocument.Pages
        a.WriteLine("----页:"+page.name+"----")
        for each shape in page.Shapes
            a.WriteLine(shape.Text)
        next
    next
    a.Close
    Set a=Nothing
    Set fs=Nothing楼主自己查下联机帮助FSO部分有详解。
      

  3.   

    Workbooks.OpenText Filename:="D:\a.txt", Origin:=936, StartRow:=1, _
            DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter _
            :=False, Tab:=False, Semicolon:=False, Comma:=False, Space:=False, _
            Other:=False, FieldInfo:=Array(1, 2), TrailingMinusNumbers:=True以txt方式打开d:\a.txt