borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Next Topic (Help on macro- If Conditional Format) New Topic New Poll Post Reply
AndreaVB Forum : VBA (Access, Excel, Word, ...) : to check file exist and send email
Poster Message
tigerdilawar
Level: Trainee

Registered: 05-08-2008
Posts: 1

icon to check file exist and send email

I'm looking for vb script to check the file existance and send email if the file exist on windows 2003 server.

regards
Tiger

05-08-2008 at 05:21 PM
View Profile Send Email to User Show All Posts | Quote Reply
GeoffS
Level: VB Lord


Registered: 29-09-2004
Posts: 538
icon Re: to check file exist and send email

You don't say which App you are using, but try this for MSAccess

Dim strFile As String

strFile = "C:/My Documents/MyFile.txt"  -- (backslash keeps getting removed when I post??)

If Dir(strFile) <> "" Then
DoCmd.SendObject acSendNoObject, , , "myemailaddress@myisp.net", , , "File Found", "Full message detail here", False
End If




[Edited by GeoffS on 07-08-2008 at 01:17 PM GMT]

____________________________
multi-tasking - the ability to hang more than one app. at the same time.

07-08-2008 at 01:14 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VBA (Access, Excel, Word, ...) : to check file exist and send email
Next Topic (Help on macro- If Conditional Format) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Il portale per lui e lei | Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder