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. C# Interaction with Word on multiple versions (MS Office 2000/2003/2007)

C# Interaction with Word on multiple versions (MS Office 2000/2003/2007)

Scheduled Pinned Locked Moved C#
csharpcomhelpquestionannouncement
7 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.
  • D Offline
    D Offline
    danielhasdibs
    wrote on last edited by
    #1

    I have a program that creates and edits Microsoft Word documents. It was created with Microsoft Word 12.0 Object Library -- I had MS Office 2007 installed. I built it and it worked great on my computer. I took it to another computer (one that had MS Office 2003 installed) and it crashes when I tell the program to create the Word document. This is the error I get (in the Details section): System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Office.Interop.Word, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.Office.Interop.Word, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' Is there a way to make sure the program can be backward and forward compatible with regard to versions of Microsoft Word? Thanks.

    L D D 3 Replies Last reply
    0
    • D danielhasdibs

      I have a program that creates and edits Microsoft Word documents. It was created with Microsoft Word 12.0 Object Library -- I had MS Office 2007 installed. I built it and it worked great on my computer. I took it to another computer (one that had MS Office 2003 installed) and it crashes when I tell the program to create the Word document. This is the error I get (in the Details section): System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Office.Interop.Word, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.Office.Interop.Word, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' Is there a way to make sure the program can be backward and forward compatible with regard to versions of Microsoft Word? Thanks.

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      danielhasdibs wrote:

      Is there a way to make sure the program can be backward and forward compatible with regard to versions of Microsoft Word?

      danielhasdibs wrote:

      I took it to another computer and it crashes

      danielhasdibs wrote:

      System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Office.Interop.Word

      Well until you get that file installed on that computer to eliminate that error you don't even know if you have a compatibility problem. :rolleyes:

      led mike

      D 1 Reply Last reply
      0
      • L led mike

        danielhasdibs wrote:

        Is there a way to make sure the program can be backward and forward compatible with regard to versions of Microsoft Word?

        danielhasdibs wrote:

        I took it to another computer and it crashes

        danielhasdibs wrote:

        System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Office.Interop.Word

        Well until you get that file installed on that computer to eliminate that error you don't even know if you have a compatibility problem. :rolleyes:

        led mike

        D Offline
        D Offline
        danielhasdibs
        wrote on last edited by
        #3

        Clarification: "took it to another computer" means installed it onto another computer. Jeez, if you don't know what's wrong don't bother replying.

        L 1 Reply Last reply
        0
        • D danielhasdibs

          Clarification: "took it to another computer" means installed it onto another computer. Jeez, if you don't know what's wrong don't bother replying.

          L Offline
          L Offline
          led mike
          wrote on last edited by
          #4

          danielhasdibs wrote:

          Jeez, if you don't know what's wrong don't bother replying.

          Wow, the error message is perfectly clear asshole so fuck off

          danielhasdibs wrote:

          The system cannot find the file specified. File name: 'Microsoft.Office.Interop.Word, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'

          led mike

          1 Reply Last reply
          0
          • D danielhasdibs

            I have a program that creates and edits Microsoft Word documents. It was created with Microsoft Word 12.0 Object Library -- I had MS Office 2007 installed. I built it and it worked great on my computer. I took it to another computer (one that had MS Office 2003 installed) and it crashes when I tell the program to create the Word document. This is the error I get (in the Details section): System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Office.Interop.Word, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.Office.Interop.Word, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' Is there a way to make sure the program can be backward and forward compatible with regard to versions of Microsoft Word? Thanks.

            D Offline
            D Offline
            danielhasdibs
            wrote on last edited by
            #5

            This program was originally written with library 11.0 -- it worked with computers that had MS Office 2003 and 2007, I updated it when I upgraded to MS Office 2007 using library 12.0, and now it does not work with MS Office 2003. How can I get it to work with 12.0? Thanks.

            L 1 Reply Last reply
            0
            • D danielhasdibs

              This program was originally written with library 11.0 -- it worked with computers that had MS Office 2003 and 2007, I updated it when I upgraded to MS Office 2007 using library 12.0, and now it does not work with MS Office 2003. How can I get it to work with 12.0? Thanks.

              L Offline
              L Offline
              led mike
              wrote on last edited by
              #6

              danielhasdibs wrote:

              How can I get it to work with 12.0?

              Stop smoking crack and READ THE FREAKING ERROR MESSAGE!

              danielhasdibs wrote:

              The system cannot find the file specified. File name: 'Microsoft.Office.Interop.Word, Version=12.0.0.0

              led mike

              1 Reply Last reply
              0
              • D danielhasdibs

                I have a program that creates and edits Microsoft Word documents. It was created with Microsoft Word 12.0 Object Library -- I had MS Office 2007 installed. I built it and it worked great on my computer. I took it to another computer (one that had MS Office 2003 installed) and it crashes when I tell the program to create the Word document. This is the error I get (in the Details section): System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Office.Interop.Word, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.Office.Interop.Word, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' Is there a way to make sure the program can be backward and forward compatible with regard to versions of Microsoft Word? Thanks.

                D Offline
                D Offline
                Dan Neely
                wrote on last edited by
                #7

                AFAIK you need to either explicitly link against the lowest supported version (not sure the old dlls are forward compatable), or build a switcher that links against every possible version you're using it on depending on availability. You could also try putting the v12 dll on the system with word 2003 (v11), but IIRC that won't work.

                Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall

                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