none
APPROPRIATE MANNER OF USING PIAs RRS feed

  • Question

  • Dear friends,

    With my new experience with VS2013, I have found that AddIns for Office2007 are no longer available for being programmed in the new IDE. However, upon repetitive searches on Google have come to the conclusion that its only the use of relevant PIAs that enable one to achieve the IDE's facility for developing a single AddIn for Office 2007-2013. Unfortunately, haven't found any detailed walkthrough for the same and only want to achieve you experts' confirmation or suggestion for modification if the following approach is enough and correct:

    1. I have Visual Studio 2013 and Office 2013 installed on my developer machine;

    2. Want to develop an AddIn for colleagues running multiple versions of Office (2007-2013);

    3. I start with a blank Excel 2007 AddIn Template on another machine with Visual Studio 2010 installed on it;

    4. I have the said project approached from the developer machine's Visual Studio 2013 and have the project updated automatically;

    5. Then in the upgraded project I open the References tab upon the Project Properties and have the following two references updated from version 15.0.0.0 to 12.0.0.0 as found on one of the computers with VS2010 installed, in the directory

    ...\Microsoft Visual Studio 10.0\Visual Studio Tools for Office\PIA\Office12\Microsoft.Office.Interop.Excel.dll and

    ...\Microsoft Visual Studio 10.0\Visual Studio Tools for Office\PIA\Office12\Office.dll

    Would these be enough or any further steps are required as well for a multi-version developing.

    Really should have had researched upon the latest IDE's limitations. :'(

    Sure am in need of an urgent feedback and support.

    Shall highly oblige all your help.

    Thanx in advance.


    Best Regards, Faraz A Qureshi

    Tuesday, December 10, 2013 4:56 PM

Answers

  • Hi,

    >> Want to develop an AddIn for colleagues running multiple versions of Office (2007-2013) <<

    If your customer base uses the 2007 Microsoft Office system, you can use Visual Studio 2013 to develop solutions that work in all three versions of Office. In this scenario, the solution will run without errors in the 2007 Microsoft Office system only if the solution doesn’t use features that are new in later versions of Office. Microsoft Office applications can also run solutions that were created by using a previous version of Visual Studio.

    For more information, please refer Running Solutions in Different Versions of Microsoft Office.

    Hope it will help.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, December 11, 2013 6:32 AM
    Moderator

All replies

  • Hi,

    >> Want to develop an AddIn for colleagues running multiple versions of Office (2007-2013) <<

    If your customer base uses the 2007 Microsoft Office system, you can use Visual Studio 2013 to develop solutions that work in all three versions of Office. In this scenario, the solution will run without errors in the 2007 Microsoft Office system only if the solution doesn’t use features that are new in later versions of Office. Microsoft Office applications can also run solutions that were created by using a previous version of Visual Studio.

    For more information, please refer Running Solutions in Different Versions of Microsoft Office.

    Hope it will help.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, December 11, 2013 6:32 AM
    Moderator
  • Thanx for all your supportive reply brother! Really do find your motivating feedback a priceless, valuable and matchless treasure. What I have understood from the same is that using references 12.0.0.0 instead of 15.0.0.0, in the way I have disclosed above, would be successful in this regard. However would you kindly throw some light on, or provide a relevant reference in respect of

    >>only if the solution doesn’t use features that are new in later versions of Office<<

    As to what are such features I need to keep a check for?

    Thanx again!


    Best Regards, Faraz A Qureshi

    Wednesday, December 11, 2013 4:57 PM
  • Hello Faraz,

    Not so, Jeffrey-Chen'.

    First of all, VSTO introduces limitations. For example, you can't support Office 2003/2002/2000..., set the target framework of your add-in to 3.5 or earlier and etc. Only specific Office versions and frameworks are supported by the Visual Studio 2010 Tools for Office Runtime. If you want to avoid such limitations you need to implement the IDTExtensibility2 interface (unfortunately the shared add-in template was removed from VS2013) without involving the VSTO runtime.

    >As to what are such features I need to keep a check for?

    You just simply need to use Office 2007 PIAs (also specific to Office 2007 Ribbon UI IDs, Office 2010 and 2013 introduced new ones). That way you will be sure that only features (objects, its methods, properties and events) of Office 2007 is available. However, at runtime you can detect the Office version and use the late binding technology for invoking Office specific methods and etc. See the Type.InvokeMember method for more information on this.

    Wednesday, December 11, 2013 6:14 PM
  • Thanx for your interest in the discussion as well Eugene.

    However, with target machines having versions only of 2007-2013 if I:

    1. Have a base initiated on VS2010 as:New Project > Office > 2007 > Excel 2007 Add-in

    2. Had the same upgraded for use in VS2013 by opening in the same

    3. On the Project Properties' page tab References replaced the Microsoft.Office.Interop.Excel.dll and Office.dll from versions 15.0.0.0 (as in VS2013) to 12.0.0.0 (as in VS2010's relevant directories of PIAs)

    Wouldn't that be enough to highlight the shortcomings in respect of Ribbon UI IDs in the VB editor as I proceed with the code?

    If not, please see if you can refer some important source of info as to how should a PIA be used in this regard so as to cater the three Office versions.

    Thanx again


    Best Regards, Faraz A Qureshi


    • Edited by FARAZ A QURESHI Wednesday, December 11, 2013 7:09 PM Correction
    Wednesday, December 11, 2013 7:06 PM
  • Hello Faraz,

    That is enough. You can find the list of Ribbon controls IDs for Office 2007 here.

    Thursday, December 12, 2013 12:55 PM
  • Hi Eugene

    <<Only specific Office versions and frameworks are supported by the Visual Studio 2010 Tools for Office Runtime. >>

    I believe Jeffrey is referring to the use of "Embed interop types" and that should, indeed, make it possible to run a VSTO 2010 or 2013 add-in with Office 2007 if the newest version of the VSTO runtime is installed...

    The link Jeffrey posts clearly states this.


    Cindy Meister, VSTO/Word MVP, my blog

    Thursday, December 12, 2013 5:24 PM
    Moderator