Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding attachment to Outlook Email
#5
Solved: 10 Years, 9 Months, 2 Weeks ago
Mine still fails at: msg.Attachments.Add (fattach)

I tried:
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 = "C:\Document and Settings\Desktop\Result.xml"
msg.Attachments.Add (fattach)
msg.send

I do ret a Run Error: Cannot find this file. (but it is there)

Thx for the idea
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 mv8167 - 05-09-2012, 10:52 PM

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

Forum Jump:


Users browsing this thread: 1 Guest(s)