Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Adding reference at runtime

Adding reference at runtime

Scheduled Pinned Locked Moved Visual Basic
csharpasp-netcomtutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nikneem2005
    wrote on last edited by
    #1

    I'm creating a component in VB.NET which acts as kind of a wrapper for Ms Outlook 2003 and Ms Word 2003. There are three components which can be used seperately. Now when I want to use the Outlook component, I don't want to load the Word assemblies and vice versa, but I dot want the controls within a single assembly. Is it possibly to create the references to the required Office Interop Assemblies at runtime (in the constructors for example) so when loading my assembly, not needed office resources will be left alone? For example, when using the Outlook control, my assembly loads Office.Core.dll and Office.Outlook.dll and NOT Office.Word.dll


    I love it when a plan comes together

    S S 2 Replies Last reply
    0
    • N nikneem2005

      I'm creating a component in VB.NET which acts as kind of a wrapper for Ms Outlook 2003 and Ms Word 2003. There are three components which can be used seperately. Now when I want to use the Outlook component, I don't want to load the Word assemblies and vice versa, but I dot want the controls within a single assembly. Is it possibly to create the references to the required Office Interop Assemblies at runtime (in the constructors for example) so when loading my assembly, not needed office resources will be left alone? For example, when using the Outlook control, my assembly loads Office.Core.dll and Office.Outlook.dll and NOT Office.Word.dll


      I love it when a plan comes together

      S Offline
      S Offline
      S Senthil Kumar
      wrote on last edited by
      #2

      Did you try using classes in the System.Reflection[^] namespace? They allow you to load assemblies at runtime, which is exactly what you want to do. Regards Senthil _____________________________ My Blog | My Articles | WinMacro

      1 Reply Last reply
      0
      • N nikneem2005

        I'm creating a component in VB.NET which acts as kind of a wrapper for Ms Outlook 2003 and Ms Word 2003. There are three components which can be used seperately. Now when I want to use the Outlook component, I don't want to load the Word assemblies and vice versa, but I dot want the controls within a single assembly. Is it possibly to create the references to the required Office Interop Assemblies at runtime (in the constructors for example) so when loading my assembly, not needed office resources will be left alone? For example, when using the Outlook control, my assembly loads Office.Core.dll and Office.Outlook.dll and NOT Office.Word.dll


        I love it when a plan comes together

        S Offline
        S Offline
        Steve Pullan
        wrote on last edited by
        #3

        The previous reply hits it on the head, but be warned that if you use Word as the Outlook email editor, it will load Word components regardless. ...Steve

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups