Hi All ,
I Need to write data into a file using TestStand and i configired the input and out as Below but i am getting error as "An error occurred calling 'Write' in 'ITextStream' of 'Microsoft Scripting Runtime' [Error Code: -2146828234] "
I have followed the same Procedure for Read Text which works fine for me.
Hope few others might have faced the problem/ or i may be doing something wrong.
Solved! Go to Solution.
Problem found, While opening a file i used IO Mode as ForReading instead of ForWriting.
Unnecessarily thread created, but then hope this may help someone later when they face particular issue.
How can I get the Object reference of a Test file in TestStand?
You are using Locals.GTS__TAG_FILE local variable to give the File object reference. So, I think you should get the Text File Object reference and store it in this Local variable before.
Can you please share me how you got the Object reference of the Text file (Open a File) and Where you specified Write/Read Modes.?
Thanks and Regards,
Create a Action Step and change the adapter in Properties-General tab to ActiveX/COM, and create a Variable with Object Reference as Type and map the same in the Module Tab (Object Reference).
How do I assign a text file's object reference to this variable (that I created with type Object Reference)?
To Open File use this snippet information