Micro Focus QTP (UFT) Forums
Getting Application Error while launching Outlook - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Getting Application Error while launching Outlook (/Thread-Getting-Application-Error-while-launching-Outlook)



Getting Application Error while launching Outlook - yogesh kancherla - 10-29-2012

Hi,
I wanted to launch Outlook with QTP code. When i am writing the below code itself its throwing Application error and QTP is getting closed

Code:
Set Outlookapp=createobject("Outlook.Application")
Set Outlookapp1=Outlookapp.GetNameSpace(

When i open braces after Getnamespace its throwing Application error and QTP is getting closed.
Please suggest where i am doing wrong?


Regards,
Yogi


RE: Getting Application Error while launching Outlook - ssvali - 10-29-2012

Try below code

Code:
Set olapp = CreateObject("Outlook.Application")
Set olns = olapp.GetNameSpace("MAPI")
olns.logon
Set objfolder=olns.getdefaultfolder(6)
objfolder.display



RE: Getting Application Error while launching Outlook - yogesh kancherla - 10-29-2012

Hi,
I copied the above code and its working but when i try to write the same its throwing application error at the below line. i am using QTP 10.0.
Code:
Set olapp = CreateObject("Outlook.Application")
Set olns = olapp.GetNameSpace(
When i use any function and open brace then application errorSad
What might be the issue?


RE: Getting Application Error while launching Outlook - krr - 10-29-2012

May be configuration problem.