仅供参考 ?"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"
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部分有详解。
?"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"
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部分有详解。
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