Login | |
|
 |
RE: Problem inserting text into files - 6/22/2008 6:46:31 AM
|
|
 |
|
| |
dm_4ever
Posts: 2664
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
|
Use FileSystemObject to loop through the files in a directory...pass their paths in and open each to append your text ...code ...creat word object ...get directory to loop through files For Each objFile in colFiles Set objDoc = objWord.Documents.Open(objFile.Path) ...code objDoc.Save Next objWord.Quit
_____________________________
dm_4ever My philosophy: K.I.S.S - Keep It Simple Stupid Read Me: http://www.visualbasicscript.com/m_24727/tm.htm Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: Problem inserting text into files - 6/22/2008 7:45:27 AM
|
|
 |
|
| |
dm_4ever
Posts: 2664
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
|
Start with something like this.... Dim objFSO : Set objFSO = CreateObject("Scripting.FileSystemObject") Dim strFolderPath : strFolderPath = "C:\Temp" Dim objFolder : Set objFolder = objFSO.GetFolder(strFolderPath) Dim objFile For Each objFile In objFolder.Files WScript.Echo objFile.Path Next
_____________________________
dm_4ever My philosophy: K.I.S.S - Keep It Simple Stupid Read Me: http://www.visualbasicscript.com/m_24727/tm.htm Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
|
|