Share via

Code Visual Basic to open NEW OUTLOOK (2024)

Anonymous
2024-05-15T17:41:55+00:00

Hi everyone!
I want to know if exist a code in Visual Basic (for a macro in Excel) that open the new version from Outlook.
I have this code
"Dim objOL as Object Set objOL = CreateObject("Outlook.Application")"
But this open the previous version and I need to open the 2024's version from Outlook.
Thanks :)

Outlook | Windows | New Outlook for Windows | For home

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-05-15T21:49:29+00:00

    Dear Kyle Sanford1,

    Good day! Thank you for posting to Microsoft Community. We are happy to help you.

    To open the latest version of Outlook using Visual Basic for a macro in Excel, you can modify your code to specify the version number. To be frank, I researched but I didn't find any information on this, however in my understanding you may need to mark the application version like below.

    
    Dim objOL As Object
    
    Set objOL = CreateObject("Outlook.Application.16")
    
    

    In this example, ".16" specifies that you want to open Outlook 2016 or later. You can change the number to match the version of Outlook you have installed on your computer. However, since this query is outside of our support boundaries. Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback or post in Developer communities | Microsoft Developer for further suggestions.

    Thank you for your cooperation and understanding. Please do not hesitate to post your queries in Microsoft Community and we will always do our best to assist you!

    Was this answer helpful?

    0 comments No comments