Skip to main content

Posts

Showing posts from June, 2015

Send Mail uisng Outlook with Vb Script or QTP/UFT

strToaddress  =   "Jayakrishna@sample.com; Jayakrishna2@sample.com " strSubject  =   "Sample-Subject" strBody  =   "Sample-Body" strAttachPath  =   "C:\Dump\Sample.txt" SendMailFromOutlook strToaddress,strSubject,strBody,strAttachPath Function  SendMailFromOutlook ( strToaddress,strSubject,strBody,strAttachPath )        Dim  objOut, Objmail        Set  objOut  =   CreateObject ( "Outlook.Application" )        Set  Objmail  =  objOut.CreateItem ( 0 )                   With  Objmail         . To   =  strToaddress         .Subject  =  strSubject         .Body  =  strBody ...

ZipFiles/Folders Using VB Script in QTP/UFT

Sample:  strmyFolderPath = "C:\Jay\Sample" strZipFilePath  = " C:\Jay\My SampleFile.Zip" Call  ZipMyFolder (  strmyFolderPath, strZipFilePath  ) Function  ZipMyFolder (  strmyFolderPath, strZipFilePath  )      Dim  intSkipped, intSrcItems      Dim  objApp, objFolder, objFSO, objItem, objTxt      Dim  strSkipped      Const  ForWriting  =   2     intSkipped  =   0      ' Make sure the path ends with a backslash      If   Right (  strmyFolderPath,  1   )   <>   "\"   Then         strmyFolderPath  =  strmyFolderPath  &   "\"      End   If      ' Use custom error handling      On  ...