01-04-2010, 12:53 PM
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 :
"Error" :
"Expected 'In'
Line[1]: "For each item 1 in objFolder.Items".
help me out with this issue ASAP
help needed
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