There is a workaround for this, see my answer here
Here is the full sample.
Const forReading = 1, forWriting = 2, forAppending = 8, CreateFile = True Set my_obj = CreateObject("Scripting.FileSystemObject").OpenTextFile("c:\temp\test.txt", forWriting, CreateFile) Function my_function(my_obj, method, text) command = "my_obj." & method & " """ & text & """" ExecuteGlobal command End Function 'make a reference to our function Set proc = GetRef("my_function") 'and call it with parameters, the first being the method invoked Call proc(my_obj, "WriteLine", "testing") 'cleanup' my_obj.Close Set my_obj = Nothing
peter source share