想到的是巨集,迴圈,dir取檔名,documents.open開檔close關檔。首行,selection.homekey,unit以wdstoryendkey選至最後,unit以wdline,extend以wdextend字串以selection.range.text取得,replace取代斷行符號chr(13)為空字串""。寫入文字檔,以open filename for output as filenumber或以scripting.filesystemobject,createtextfile更名以name oldpathname as newpathname