Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email an Attachment using VB

Status
Not open for further replies.

lakers8175

IS-IT--Management
Sep 18, 2001
67
US
I am renaming a file using VB. I would like to attach the renamed file to an email, and emial to the same person each day. Can someone help me with the email part of this? Thank you.

Here is my code to rename the file.
Function FileRenameTri()

Dim OldName As String
Dim NewName As String
Dim Yesterday As String
Dim Yesterday1 As String

Yesterday = Date - 1
Yesterday1 = Format(Yesterday, "mmddyy")
OldName = "I:\Deliv.csv": NewName = "I:\Deliv" & Yesterday1 & ".csv"
' Move and rename file
Name OldName As NewName

End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top