Results 1 to 5 of 5

Thread: Outlook 2003 COM Addin

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2000
    Location
    NJ, USA
    Posts
    326

    Outlook 2003 COM Addin

    I'm trying to build an Outlook 2003 COM Add-In using Visual Basic 6.0. I can't find any tutorials online for 2003. I've found plenty for 2000 though. I tried using a 2000 example exactly as I found it, but I get a type mismatch error when Outlook loads.

    Also, the reason I'm building the add in, is so that I can drag and drop emails into my Visual Basic program without getting the Security warning window. I've read that using a COM add in allows you to bypass the security warning. Is it even possible to pass the email item from my COM add in, to my Visual basic program? How would you reference the COM add in from within a VB program?
    VB.NET 2005 Express with .Net 2.0
    C# 2010 .Net 4.0

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

    Re: Outlook 2003 COM Addin

    Here is a good Outlook 2003 COM Add-In example at MS.

    http://msdn.microsoft.com/library/de...asp?frame=true
    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
    Hyperactive Member
    Join Date
    Sep 2000
    Location
    NJ, USA
    Posts
    326

    Re: Outlook 2003 COM Addin

    Quote Originally Posted by RobDog888
    Here is a good Outlook 2003 COM Add-In example at MS.

    http://msdn.microsoft.com/library/de...asp?frame=true
    Thanks Rob.

    Can you answer a question for me? I see using the COM Object from within Outlook I can get full access to mail items, etc.

    Is there any way to interface with this COM object from a Visual Basic program that is running outside of Outlook?
    VB.NET 2005 Express with .Net 2.0
    C# 2010 .Net 4.0

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

    Re: Outlook 2003 COM Addin

    Yes, you can access Add-In from VB6.
    VB Code:
    1. Option Explicit
    2. 'Add a reference to MS Outlook xx.0 Object Library
    3. 'Add a reference to MS Office xx.0 Object Library
    4. Private Sub Form_Load()
    5.     Dim oCOM As Office.COMAddIn
    6.     Set oCOM = Outlook.COMAddIns.Item("MyAdd-In")
    7.     MsgBox oCOM.Description
    8.     Set oCOM = Nothing
    9. End Sub
    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
    Hyperactive Member
    Join Date
    Sep 2000
    Location
    NJ, USA
    Posts
    326

    Re: Outlook 2003 COM Addin

    Okay, one more question. Is it possible to call a function within my COM addin from an external program? If it is possible I can't figure out the syntax in my addin to create a function.

    I tried making a Public Function but my external app just says that the ActiveX control can't create an instance.
    VB.NET 2005 Express with .Net 2.0
    C# 2010 .Net 4.0

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