Micro Focus QTP (UFT) Forums
Automating 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: Automating Outlook (/Thread-Automating-Outlook)

Pages: 1 2


Automating Outlook - PrabhatN - 04-07-2011

Hello All,

I have to send mails from Outlook through QTP. I encountered "ActiveX component can't create object: "Outlook.Application" error when ran my code.

Can anybody help me doing it?

Note: Refer to the attached screenshot


RE: Automating Outlook - Nilesh - 04-07-2011

Hi Prabhat,

Is outlook installed on your machine?



RE: Automating Outlook - PrabhatN - 04-07-2011

Hi Nilesh,

Yes, outlook is installed in my machine. I have associated ActiveX addin also.


RE: Automating Outlook - Nilesh - 04-07-2011

Hi Prabhat,

i think there is problem with outlook installation use 'Detect and Repair' option in Outlook.
Maybe that will fix it.


Regards
Nilesh


RE: Automating Outlook - PrabhatN - 04-07-2011

Hi Nilesh,

Do i need to reinstall outlook in way to chose Detect and Repair or do we have an option in the outlook to do so?


RE: Automating Outlook - Nilesh - 04-07-2011

yes you need to re-install it,Detect and Repair option will come up if already Outlook is installed. before that close all the application and restart the machine before and after the installation


RE: Automating Outlook - PrabhatN - 04-08-2011

It didn't help either.

Can anybody come up with anything else?


RE: Automating Outlook - Jay - 04-08-2011

Hi Prabhat,

Follow the below steps:
1. First Open the QTP
2. Then Outlook
3. Open new test in QTP
4. Press Record button and try recording outlook (this will make necessary register entry for Active X)
5. Now use your code to send a mail

Hope this will surely help.



RE: Automating Outlook - basanth27 - 04-08-2011

Really?? Are you kidding me? If it was that easy there wouldnt be a need for an AOM.


On the Registry can you see if this entry is present ??

My Computer\HKEY_CLASSES_ROOT\Outlook.Application


RE: Automating Outlook - Ankur - 04-08-2011

Looks like your machine's registry has gone corrupt. Try in the following order and let us know if any of these helps -

1) "Detect and Repair" Outlook.
2) Repair your MS office installation.
3) Use
Code:
CreateObject("Outlook.Application","localhost")