Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Microsft Outlook Email and QTP
#1
Not Solved
Hi All,

I am trying to write a script which will automate the process of readign emails from QTP and attaching it to Qtp .

Process is like below
1.Record a proecess of the application
2. Request gets submitted
3. Manager gets an email for approval

So the manger email should be captured and placed in QTP .

So i have tried writing a scritps which will read the emails from Microsoft outlook

script is as below :
Code:
Set olApp = CreateObject("Microsoft.outlook")
Set olns = olApp.GetNameSpace("MAPI")
Set objFolder = olns.GetDefaultFolder(2)
For each item 1 in objFolder.Items
If item 1.Unread Then
msgbox item 1.body
EndIf
Next

"Error" :
"Expected 'In'
Line[1]: "For each item 1 in objFolder.Items".

help me out with this issue ASAP
help needed
Reply


Messages In This Thread
Microsft Outlook Email and QTP - by siri - 01-04-2010, 12:53 PM
RE: Microsft Outlook Email and QTP - by Saket - 01-04-2010, 01:34 PM
RE: Microsft Outlook Email and QTP - by siri - 01-04-2010, 02:05 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Extracting Email Body from Outlook waseem.khan.91 0 1,910 03-04-2019, 02:53 PM
Last Post: waseem.khan.91
  Extracting Email Body from Outlook waseem.khan.91 0 1,035 03-01-2019, 02:51 PM
Last Post: waseem.khan.91
  Find the email using subject with the help of vb script Raheem Shaik 0 1,465 12-12-2018, 02:57 PM
Last Post: Raheem Shaik
  Cannot attach the text file to email arpan 2 3,282 07-19-2013, 12:13 AM
Last Post: arpan
  Unable to send an email from Outlook which is already opened as draft attiliv 0 2,150 03-24-2013, 11:14 AM
Last Post: attiliv

Forum Jump:


Users browsing this thread: 1 Guest(s)