Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding attachment to Outlook Email
#4
Solved: 11 Years, 3 Months, 4 Weeks ago
For me the below script is working fine.

Code:
Set olapp = CreateObject("Outlook.Application")
Set olns = olapp.GetNameSpace("MAPI")
Set msg = olapp.CreateItem(mailitem)
Set rep = msg.Recipients.Add ("abc@qtp.com")

msg.subject = "Test Mail"
msg.body = "Mail from QTP"
fattach = "Z:\Results\Result.xml"
msg.Attachments.Add (fattach)
msg.send
Reply


Messages In This Thread
Adding attachment to Outlook Email - by mv8167 - 05-05-2012, 12:25 AM
RE: Adding attachment to Outlook Email - by ssvali - 05-08-2012, 11:30 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Send automatic email notification when test run started helmzshelmz 0 1,080 04-03-2020, 07:54 AM
Last Post: helmzshelmz
  Pages and Frames adding _1, _2, _3... zunebuggy 1 1,671 05-30-2017, 12:17 AM
Last Post: Vichu M J
  Adding negative amount in webedit Rose 1 2,142 06-30-2016, 09:34 PM
Last Post: babu123
  Adding data into rows that add dynamically with setcelldata azar81 4 5,936 04-13-2015, 05:24 PM
Last Post: vidya2k2
  How to attach HTML file to Email Naresh 0 3,069 04-06-2015, 02:04 PM
Last Post: Naresh

Forum Jump:


Users browsing this thread: 1 Guest(s)