'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Script : Verzeichnis mit Hilfe des Word-COM Objektes in einem Word ' ' Dokument ausgeben ' ' File : 05_02_WordComObj.vbs ' ' Date : 2007-02-26 - Last modified: 2007-02-26 ' ' ' ' Michael Puff - http://www.michael-puff.de ' ' ' ' Durch ein File-Container Attribut iterieren ' ' Öffnen eines Word-COM Objektes ' ' ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Constants ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' dim Folder FOLDER = "\\srv.ovm-kassel.de\Profile$\b25a09_puff\Eigene Dateien\Anwendungsentwicklung_Johlen\VBScripte" ' Dateiliste erstellen Set fso = CreateObject("Scripting.FileSystemObject") Set fo = fso.GetFolder(FOLDER) Set files = fo.files ' Word-Com Objekt erzeugen Set msw = CreateObject("Word.Application") msw.Visible = True Set DocContainer = msw.documents Set NewDoc = DocContainer.Add Set ActiveDoc = msw.Selection ' Ausgabe der dateiliste in ein Word-Dokument For Each file in files s = s & file.Name & Chr(13) & Chr(10) Next ActiveDoc.TypeText(s)