Results 1 to 7 of 7

Thread: [RSLVD] createobject for outlook message error

  1. #1

    Thread Starter
    Fanatic Member kevin_sauerwald's Avatar
    Join Date
    Feb 2002
    Location
    outside Philly
    Posts
    516

    Resolved [RSLVD] createobject for outlook message error

    ok I get an " ActiveX object cant create object" error 429

    I know its because we have this new Cisco security agent.. that
    is blocking it.. unless I move the security to low.. so my question is
    how can I make it bypass this error and not crash... I tried to make
    a on error goto CantOpenObject... but it doesnt do it.. it just errors
    and crashes the program.. I want to make it tell them to change
    the settings..(really I want Cisco to allow my program to do it, but
    there is not Allow list in it, only deny and its not in the deny)..

    so anyone know how I cant test if it will allow it and then display and
    not crash ?
    Last edited by kevin_sauerwald; Jan 16th, 2007 at 12:10 PM. Reason: resolved

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: createobject for outlook message error

    If you are running Outlook in an Exchange server environment then you can use the Exchange servers management functionality to allow your control/app to run.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Fanatic Member kevin_sauerwald's Avatar
    Join Date
    Feb 2002
    Location
    outside Philly
    Posts
    516

    Re: createobject for outlook message error

    actually I was talking to a co-worker to seconds after I wrote this..

    he was opening outlook another way.. he had it referenced at design time
    not at runtime like I was.. seems Cisco doesnt care if you have it referenced
    in at design time only run time... so I rekon I'll make it call it that way from
    now on..

    thanks though.. see if below makes sense to you

    incase another search finds this post

    old way ..no Reference added

    VB Code:
    1. Dim objFileSys As New FileSystemObject
    2.  
    3. If objFileSys.FileExists(dirDirectory.Path & "\" & filFiles.FileName) Then  'If exists then proceed
    4.     Set objOutlook = CreateObject("Outlook.Application")
    5.     Set objOutlookMsg = objOutlook.CreateItem(0)

    new way .. needs Microsoft Outlook added as reference.
    VB Code:
    1. Dim oApp As New Outlook.Application
    2.     Dim oEmail As Outlook.MAPIFolder
    3.     Dim oNameSpace As Outlook.Namespace
    4.     Set oNameSpace = oApp.GetNamespace("MAPI")
    5.     Set oEmail = oNameSpace.GetDefaultFolder(olFolderInbox)
    6.  
    7.     With oEmail.Items.Add(olMailItem)

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: createobject for outlook message error

    Ok, you are now doing Early Binding. The main thing to watch out for when used on other systems is that what ever Outlook version you reference on the system you are compiling this on is going to be required on any system that uses it and since Outlook only lets you have one version instaled it is a bit restrictive. This is where Late Binding really helps out (what you were doing earlier). It allows the code to bind to whatever Outlook version s installed.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5

    Thread Starter
    Fanatic Member kevin_sauerwald's Avatar
    Join Date
    Feb 2002
    Location
    outside Philly
    Posts
    516

    Re: createobject for outlook message error

    ok that makes perfect sense... maybe I will look into getting the access
    issue fixed.. this is a internal corp program only ( we all have the same
    outlook version) so I could do the new way.. but good to know..

    thanks a bunch..

  6. #6

    Thread Starter
    Fanatic Member kevin_sauerwald's Avatar
    Join Date
    Feb 2002
    Location
    outside Philly
    Posts
    516

    Re: [RSLVD] createobject for outlook message error

    ha.. foiled again.. not cisco gets blocks this call..

    Set oNameSpace = oApp.GetNamespace("MAPI")

    so I guess I need to find a way to have Cisco think its an ok program..

  7. #7
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: [RSLVD] createobject for outlook message error

    Do you also run an Exchange Server?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

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