Category: UFT/QTP

Create ,Read and write a text file

Create ,Read and write a text file

In this post, we are going to learn how to Create ,Read and write a text file . Creating a text File: Set FSO = CreateObject(“Scripting.FileSystemObject”) Set oFile = FSO.CreateTextFile(“D:\Sample.txt”,True) oFile.Close Set oFile = Nothing...

Send mail from outlook with an attachment

Send mail from outlook with an attachment

You can send mail from outlook with an attachment to intended persons. Function SendMail(SendTo, Subject, Body, Attachment) Set olook=CreateObject(“Outlook.Application”) Set Mail=olook.CreateItem(0) Mail.to=SendTo Mail.Subject=Subject Mail.Body=Body If (Attachment <> “”) Then Mail.Attachments.Add(Attachment) End If Mail.Send olook.Quit...