lakers8175
IS-IT--Management
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
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