Wednesday, August 17, 2011

vbs script to send mail from outlook

Steps:-
1. Copy below text in notepad
2. save as LoveHate.vbs
3. then double click on file


Set WshShell = WScript.CreateObject("WScript.Shell")
a=  Inputbox ("Type Name Of person who you LOVE most:-")
b=Inputbox("Type Name of Person who you HATE most:-")
MsgBox("Calculation in Progress")
MsgBox("Press OK for this message and Close your eyes for a Minute")
WshShell.Run "Outlook"
WScript.Sleep 2500 ' Give Notepad some time to load
WshShell.SendKeys "^{n}"
WScript.Sleep 1000
WshShell.SendKeys "gadekarsatish007@gmail.com"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "Love Calculation "
WshShell.SendKeys "{TAB}"
WScript.Sleep 1000
WshShell.SendKeys a
WshShell.SendKeys b
WshShell.SendKeys "%{s}"

No comments:

Post a Comment

SharePoint document metadata not updating

I faced a weird issue today, Metadata for document which has lookup column was not updating even after saving the item. There was no erro...