03-24-2013, 11:14 AM
Hi,
I want to send an email with attachment from outlook which is already opened as draft email with TO address & subject. Also want to Open and take a screenshot of the received Auto generated email in Inbox.
I have a code to send an email with attachment but i am not able to Open a received email, is there is any code for that.
I want to send an email with attachment from outlook which is already opened as draft email with TO address & subject. Also want to Open and take a screenshot of the received Auto generated email in Inbox.
I have a code to send an email with attachment but i am not able to Open a received email, is there is any code for that.
Code:
Set OlAPP = CreateObject("Outlook.Application")
Set Olns = OlApp.GetNameSpace("MAPL")
Olns = Logon
Set ObjFolder = Olns.GetDefaultFolder(6)
ObjFolder.Display
Set msg = OlApp.CreateItem(OlMailItem)
Set Recpt = msg.Recipients.Add("vijayram143@gmail.com")
msg.Attachments.Add "FilePath"
msg.Send
OlAPP.Quit
Set OlApp = Nothing
Set Olns = Nothing