Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a vbscript that runs on a button click. This script opens up the outlook and attach a file stored in C Drive.
Now I need to modify this :
1) The attachment should be a chart that is present on the same sheet (instead of file kept on C Drive)
2) When we click that button, it should ask us to enter password, and if correct password is entered, then only should run the vb script.
Sub Send()
Set objOL = CreateObject("Outlook.Application")
Set objMsg = objOL.CreateItem(olMailItem)
objMsg.Attachments.Add "c:\samplefile1.txt"
objMsg.subject = "Subject line"
objMsg.body = "Your files are ready to send."
objMsg.to = "test@domain.com"
objMsg.Display
End sub
Can you please help.
Thanks