Excel VBA Compile error RRS feed

  • Question

  • why does generate a compile error?

    Dim myolApp As Outlook.Application

    I am writing an Excel application which I want to create an outlook contact and calendar entry.  All sample code I have seen - including Microsoft - starts with this type of statement and it fails to compile.

    This appears to work OK

    Set olApp = CreateObject("Outlook.Application")

    then the following fails etc.

    Set myNamespace = myolApp.GetNamespace("MAPI")

    Just trying to understand why I get these errors when so many samples appear to use this

    • Moved by Carl Cai Monday, September 30, 2013 2:27 AM not support
    Friday, September 27, 2013 2:01 PM


All replies