1. Here's a thread that needs an answer: Duplicate Primary Mail Accounts outlook 2010
    Dismiss Notice

Outlook.Application now produces error

Discussion in 'Slipstick.com: VBA and Programming Articles' started by avant-guvnor, Nov 6, 2017.

  1. avant-guvnor

    avant-guvnor

    New Member
    Today my Office 365 updated automatically to version 16.0.8625.2121.

    Now all my vba code in Outlook 2016 with:
    Dim oOutlook As Outlook.Application
    and
    Set oOutlook = CreateObject("Outlook.Application")

    produces the following error on the Set statement:

    [​IMG]

    is anyone else getting this or does anyone have a solution?
     
  2. Diane Poremsky

    Diane Poremsky

    Senior Member
    Are you running the macro from outlook or calling it from another program?

    i use this this form in outlook macros:
    Set oOutlook = Outlook.Application
     
  3. Diane Poremsky

    Diane Poremsky

    Senior Member
    An Excel macro I'm helping a guy with uses this and its working in current versions. (The first should be GetObject if outlook is open, then create it if it's not open but its his macro and it works...)

    Set olApp = CreateObject("Outlook.Application")

    If olApp Is Nothing Then
    Set olApp = CreateObject("Outlook.Application")
    -- snip--
     
  4. avant-guvnor

    avant-guvnor

    New Member
    All code is running from a macro in Outlook 2016. Code has worked for years until the recent Office 365 update.

    Changed all Set oOutlook = CreateObject("Outlook.Application") to Set oOutlook = Outlook.Application. Code is now working. Still, it does not explain why/what changed in the Office 365 update.
     
  5. Diane Poremsky

    Diane Poremsky

    Senior Member
    I believe it might be related to the security changes they made in the last couple of updates, but don't recall changes to createobject mentioned - might have missed though as i was distracted by an illness/death in our extended family.
     
  6. avant-guvnor

    avant-guvnor

    New Member
    Thank you for the info and sorry for your loss.

    Keep up the good work. All the best.
     

Share This Page