Results 1 to 3 of 3

Thread: Create Object Issue

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2015
    Location
    Cambridgeshire, UK
    Posts
    49

    Create Object Issue

    I'm struggling with this function!
    This all worked fine, until we upgraded to Office 365.
    Now, this:
    Code:
      Dim oApp As Object
                Set oApp = CreateObject("Word.Application") 'This works, and starts a Word document session.
                Set oApp = CreateObject("Outlook.Application") 'This doesn't work, error 429
                If Err = 429 Then
                    Set oApp = GetObject(, "Outlook.Application")   'Nor does this, same error
                End If
    I tried using Early binding, but that made no difference.
    Even with a reference to Microsoft Office 16 Object Library, the statement "Dim oApp as Outlook.Application" isn't recognised.

    Is there some other way of referencing Outlook 2016?

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Create Object Issue

    you may need to prompt the user to start outlook, then getobject should work (maybe)
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,854

    Re: Create Object Issue

    I have seen this when you run your program from the IDE (Windows 10 and the IDE is running elevated)
    When compiled and running as a normal user the program does work.

    Excel and Word can be started from an elevated process, it seems that Outlook behaves different

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width