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. C#
  4. Outlook and word reference??

Outlook and word reference??

Scheduled Pinned Locked Moved C#
helpcomtutorialquestion
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.
  • R Offline
    R Offline
    Reinier van de Wetering
    wrote on last edited by
    #1

    When i make a reference to excel it works fine, but when i try to make one to outlook or office i get the following error: "A reference to "'officePath'.Outlook.exe" could not be added. This is not a valid assembly or Com Component. Only components with extensions 'dll' and Com Components can be added. Please make sure the file is accesisble and that it is a valid assembly or com component" I am using Office 2003 professional. Does anyone know how to fix this??

    F H 2 Replies Last reply
    0
    • R Reinier van de Wetering

      When i make a reference to excel it works fine, but when i try to make one to outlook or office i get the following error: "A reference to "'officePath'.Outlook.exe" could not be added. This is not a valid assembly or Com Component. Only components with extensions 'dll' and Com Components can be added. Please make sure the file is accesisble and that it is a valid assembly or com component" I am using Office 2003 professional. Does anyone know how to fix this??

      F Offline
      F Offline
      fnm
      wrote on last edited by
      #2

      When you want to connect to Outlook, using the add reference in Visual Studio, and point to Microsoft Outlook 11 (which isnt the outlook.exe). If I was at home, I could give you the full details, but I am pretty sure you cannot directly connect to the Outlook executable.

      1 Reply Last reply
      0
      • R Reinier van de Wetering

        When i make a reference to excel it works fine, but when i try to make one to outlook or office i get the following error: "A reference to "'officePath'.Outlook.exe" could not be added. This is not a valid assembly or Com Component. Only components with extensions 'dll' and Com Components can be added. Please make sure the file is accesisble and that it is a valid assembly or com component" I am using Office 2003 professional. Does anyone know how to fix this??

        H Offline
        H Offline
        Heath Stewart
        wrote on last edited by
        #3

        You should install the Visual Studio Tools for the Microsoft Office System, which comes with O2K3 Pro I believe. You can download the Office XP PIAs (primary interop assemblies) which you should use as opposed to making your own. These are verified assemblies that are associated with the COM components and typelibs typically produced by the company that wrote the application that you're interop'ing. The Office XP PIAs can be downloaded from http://www.microsoft.com/downloads/details.aspx?FamilyId=C41BD61E-3060-4F71-A6B4-01FEBA508E52&displaylang=en[^] and should work in a pinch (since properly-written COM is mostly backward compatible). The Office 2K3 PIAs cannot be downloaded (except through MSDN Subscriptions), but should be on the O2K3 Pro CD.

        Microsoft MVP, Visual C# My Articles

        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