Announcement

Collapse
No announcement yet.

Unconfigured Ad Widget

Collapse

User-defined type not defined

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • User-defined type not defined

    I have some code:
    When I run it I get error "User-defined type not defined excel vba Outlook.Application".
    Code:
    Sub SendEmails()
    
        Dim olApp As Outlook.Application
        Dim olMail As MailItem
    
       Set olApp = New Outlook.Application
    May you helpme to find the problem.

    Thanks in advance.

  • #2
    Re: User-defined type not defined

    You need to set a reference to the Microsoft Outlook Object Library in Tools>References...
    Boo!

    Comment


    • #3
      Re: User-defined type not defined

      Prompt & simple..
      Norie, thank you.

      Comment


      • #4
        Re: User-defined type not defined

        What if Reference to the Microsoft Outlook Object Library in Tools>References is set and still get error. Error also reads "Outlook is not available"

        Comment


        • #5
          Re: User-defined type not defined

          Originally posted by Dw6853
          What if Reference to the Microsoft Outlook Object Library in Tools>References is set and still get error. Error also reads "Outlook is not available"
          suggest that you actually read the Forum Rules that you agreed to.

          You should not hijack threads, but start your own with a reference to the other one if you think it will help
          Hope that Helps

          Roy

          New users should read the Forum Rules before posting

          For free Excel tools & articles visit my web site

          If I have helped you and you feel like putting your hand in your pocket please make a donation to Children in Need

          RoyUK's Web Site

          royUK's Database Form

          Where to paste code from the Forum

          About me.

          Comment


          • #6
            Re: User-defined type not defined

            my apologies; will do

            Comment

            Trending

            Collapse

            There are no results that meet this criteria.

            Working...
            X