none
VS 2005 PIA for Office 2003/2007 RRS feed

  • Question

  • I am working on a project that requires me to be able to create both Excel 2003 documents and Excel 2007 documents.  Ihave installed VSTO 2005 SE, I have run through the Office 2007 PIA setup and still only have the Excel Object 11.0 Library available to me in my COM Reference Tab, although I have the Microsoft Office 12.0 Object Library installed and am referencing it.  I have been through all of the MSDN pages that I can find regarding PIA and cannot figure out why the object libraries will not show up.  What am I missing, doing wrong, overlooking, etc??

    Also, If I can get this installed, how do I differentiate between the two objects in code, just give them an alias on the Imports statement?

    Thanks in advance!

    Koding
    Thursday, May 14, 2009 12:22 PM

Answers

  • Chicken-and-egg, you can only get a reference to the 2003 PIA if you have Office 2003 installed on your machine.  There is a workaround, but it is ugly.  You'd have to copy the PIA from the GAC into your project directory and add a reference to it with Project + Add Reference, Browse tab.

    Hans Passant.
    • Marked as answer by Zhi-Xin Ye Wednesday, May 20, 2009 3:25 PM
    Thursday, May 14, 2009 12:53 PM
    Moderator

All replies

  • Chicken-and-egg, you can only get a reference to the 2003 PIA if you have Office 2003 installed on your machine.  There is a workaround, but it is ugly.  You'd have to copy the PIA from the GAC into your project directory and add a reference to it with Project + Add Reference, Browse tab.

    Hans Passant.
    • Marked as answer by Zhi-Xin Ye Wednesday, May 20, 2009 3:25 PM
    Thursday, May 14, 2009 12:53 PM
    Moderator
  • I have Office 2003 Pro installed on my machine.  In researching though, it looked like the VSTO 2005 and/or the 2007 PIA was supposed to grant you access to the 2007 office objects so that you could work with them in .net 2005 projects.  Is that not the case?
    Thursday, May 14, 2009 2:28 PM
  • although I have the Microsoft Office 12.0 Object Library installed and am referencing it.
    Oops, got that backwards.  How exactly did you get the 2007 object libraries?  You can only legally obtain them by installing Office 2007.  It is not the same thing as the PIA.

    Hans Passant.
    Thursday, May 14, 2009 3:00 PM
    Moderator
  • It came up after I installed the VSTO 2005 SE.  According to what I read, the other Office 12.0 objects should have become available as well, which is why I am confused.
    Thursday, May 14, 2009 4:52 PM