Outlook 365 automation

Originally posted by kgreger on April 07, 2025

I need to automate a process where my main application opens Outlook, creates an email, fills out some fields, and sends out the email. At times, each email is mapped to another “class” of Outlook objects, in which, no controls can be located during playback. And even when all controls appear to be mapped to the same class, the panelMessage never seems to be identified. Is there a setting somewhere that needs to be adjusted?

I’m using Outlook 365 with TestComplete 15.73.16.7 x64.

Thanks!

Originally posted by scot1967 on April 07, 2025

It has been my experience that automating Microsoft apps or any apps that were not built by your team is a challenge. Have you looked into the settings in Tools...Project Properties\Open Applications\MSAA?

https://support.smartbear.com/testcomplete/docs/reference/test-objects/controls/desktop/msaa/index.html

There are quite a few advanced settings in ‘Open Applications’ as well as ‘Object Mapping’ you may find useful. I can’t speak to your specific situation but I have used MSAA to expose controls buried in Microsoft tree objects that were otherwise not accessible (or just flakey in automation).

… If you find my posts helpful drop me a like! :+1: Be sure to mark the best answer if you get one to help others out and to credit the one who helped you. :smiling_face_with_sunglasses:

Good luck!

Originally posted by kgreger on April 07, 2025

Thanks for the lead, i will check it out!

Originally posted by rraghvani on April 08, 2025

Are you actually testing Outlook 365? I don’t understand the purpose of using TestComplete to automate Outlook 365!?

Originally posted by catalin_ochisor on April 09, 2025

Hmm… all that you need is to send an email from Outlook or there is more attached to the test? There is an example for this at:

https://support.smartbear.com/testcomplete/docs/scripting/sending-email-from-scripts.html?sbsearch=Sending%20emails

Also, check related info:

https://support.smartbear.com/testcomplete/docs/reference/program-objects/builtin/sendmail.html

Maybe research for another approach than getting too deep into Outlook- sent email using another solution? move emails in folders in separate step not using Outlook?

Originally posted by scot1967 on April 09, 2025

It sounds like his tested application is performing this action and what is needed is to perform this in automation within the tested app.

I need to automate a process where my main application opens Outlook, creates an email, fills out some fields, and sends out the email.

Originally posted by kgreger on April 09, 2025

Thank you, you are 100% correct!

Originally posted by kgreger on April 09, 2025

I am not trying to test Outlook independently. I am testing an application, which in turn uses Outlook to create an email. This entire of process of email creation from my application is what I would like to have automated. Sorry for not being clear.

Originally posted by rraghvani on April 09, 2025

Got it!

If you enable MSAA in Project Settings,

Then majority of all Outlook controls will be exposed to TestComplete, as shown below

Originally posted by TildaGray on May 06, 2025

My problem is solved, thank you so much.

Originally posted by Hassan_Ballan on May 06, 2025

Would you mind marking as solution the post that solved it for you.