VBA Code to save file and send as email

Joined
Apr 8, 2009
Messages
2
Reaction score
0
Please!!!!!Help!!!!

I have a main spreadsheet that i run stuffs from,I want a code that will do the following at a time

  1. Save as file name "Done with current date" in a folder titled "Stress" each time i run it for any number of time i run it.
  2. close it.
  3. I then want this file to be automatically sent to Microsoft outlook as hyperlink. So when read click it, it will open the file sent automatically
Thanks ALot!!!!!!!!!!!!!!
 
Hi

This section will show you how to write string to a file.
Private Sub Form_Load()

Dim F As Integer, pass As String
F = FreeFile
save = txtNew
Open App.Path & "\password.txt" For Output As F
Write #F, Text1.text
Close #F

End Sub

Hope this helps, the email part still remains unanswered by me.
rgrds
 
Back
Top