Author: Shekhar Sharma

File System Objects

Use of FileSystemObject

File System Object is an important concept. It is basically used for interacting with Computer’s File System. It perform operations like Creating folder,deleting folder,Creating Text file,reading ,writing etc. Let’s see use of FileSystemObject in...

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...