Created
May 8, 2013 00:07
-
-
Save jesse1981/5537210 to your computer and use it in GitHub Desktop.
Get file contents to variable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function includeFile (fSpec) | |
| On Error Resume Next | |
| dim fileSys, file, fileData | |
| set fileSys = createObject ("Scripting.FileSystemObject") | |
| set file = fileSys.openTextFile (fSpec,ForReading) | |
| fileData = file.readAll () | |
| file.close | |
| set file = nothing | |
| set fileSys = nothing | |
| includeFile = fileData | |
| end function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment