Cannot attach the text file to email - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: Cannot attach the text file to email (/Thread-Cannot-attach-the-text-file-to-email) |
Cannot attach the text file to email - arpan - 07-17-2013 Hi Guys, I'm having trouble trying to attach a file to an email. Following is the script and error message i'm getting when i run it. I close all the processes and restarted the machine and still getting this error. Code: Const ForReading = 1, ForWriting = 2 Error Message: The process cannot access the file because it is being used by another process. Code: Line (25): "oMessage.AddAttachment strAttachment". Any help will be appreciated. Thanks Arpan RE: Cannot attach the text file to email - ssvali - 07-18-2013 Try this... Save the text file and close it and then send the mail with attachment RE: Cannot attach the text file to email - arpan - 07-19-2013 Thanks ssvali. It worked. Really appreciate your help. |