none
how to create an Outlook.Application object? RRS feed

  • Question

  • I've been looking at these topics:

    https://msdn.microsoft.com/en-us/library/office/ff462095.aspx

    https://msdn.microsoft.com/en-us/library/office/microsoft.office.interop.outlook._application.aspx

    https://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.application.aspx

    while the first URL shows a subroutine sample to Send an email that is clear to me, the one parameter passed in is an Outlook.Application object which is not show in the example. I'm not clear on how to go about creating this "outside" the subroutines. The other URLs are places I found searching trying to figure that out but with not enough clarity to accomplish it.


    David K. Ream

    Thursday, March 16, 2017 8:55 PM

Answers

  • Hi Dave Ream,

    when you wan to use Outlook.interop to automate the outlook and want to use the functionality of outlook at that time you need to add reference to Microsoft.Office.Interop.Outlook in your project.

    then you need to create an object of outlook.application like below.

    using Outlook = Microsoft.Office.Interop.Outlook; 

    then you can try to use this object to access the methods and properties of outlook object model.

    Outlook Object Model Overview

    then you can try to automate it and perform the desired operation.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Dave Ream Friday, March 17, 2017 11:16 AM
    Friday, March 17, 2017 5:19 AM
    Moderator

All replies

  • Thursday, March 16, 2017 10:05 PM
  • Hi Dave Ream,

    when you wan to use Outlook.interop to automate the outlook and want to use the functionality of outlook at that time you need to add reference to Microsoft.Office.Interop.Outlook in your project.

    then you need to create an object of outlook.application like below.

    using Outlook = Microsoft.Office.Interop.Outlook; 

    then you can try to use this object to access the methods and properties of outlook object model.

    Outlook Object Model Overview

    then you can try to automate it and perform the desired operation.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Dave Ream Friday, March 17, 2017 11:16 AM
    Friday, March 17, 2017 5:19 AM
    Moderator