Can I use VS 2012 to create an Office 2007 add-in?
Asked Answered
M

2

9

This would suggest not: http://msdn.microsoft.com/en-us/library/ee519072(v=vs.110).aspx

But, but... really?

Office 2007 is still ubiquitous - surely they've not dropped support for it already? I need to support it, and it seems like this would mean I can't use VS2012.

Or maybe this restriction only applies to the RC? (Please). Or perhaps it creates add-ins that are targetted at 2010 but can still run on 2007? (Clutching at straws).

Tell me it ain't so...

Mylander answered 22/7, 2012 at 21:45 Comment(1)
It would seem that way, but this is speculation at this point.Dwt
S
3

You can create an Office addin that targets 2010, but that still works in Office 2007. The trick is that you need to be aware of what interop types and events are present in 2007 versus 2010. If you try accessing an event or class member that doesn't exist in 2007 you will have issues.

Visual Studio 2012 only includes Office 2010 project templates. Another annoyance/limitation is that they eliminated support of Setup Projects which is how we have been releasing our plugin. Setup Projects have been replaced by InstallShield Limited Edition (ISLE).

Sewer answered 23/7, 2012 at 14:25 Comment(1)
Thanks. So how about the NoPIA stuff? I presume that will not work, at least for 2007? Looks like I need to stick with VS 2010 :-(Mylander
T
2

FYI, circa March 2013, I just created an Excel Addin targeted to Excel 2013 that runs just fine in Excel 2007.

I had to remove/replace calls to get_Range but that's no surprise since the get_Range always seemed a bit of a hack.

#if PRE_VSTO_2012
 Excel.Range vsto_range = vsto_sheet.Cells.get_Range( 
  vsto_sheet.Cells[1, 1],
   vsto_sheet.Cells[rowCount, colCount]) as Excel.Range;
#else
   Excel.Range top_left = vsto_sheet.Cells[ 1, 1 ];
    Excel.Range bottom_right = vsto_sheet.Cells[ rowCount, colCount ];
     Excel.Range vsto_range = vsto_sheet.Range[ top_left, bottom_right ];
#endif

I've still yet to create an InstallShield LE package. That's next...

Tejeda answered 7/3, 2013 at 10:39 Comment(2)
"I've still yet to create an InstallShield LE package. That's next..." -- You poor thing. You think you're 90% done, but in fact 90% of the pain and frustration lies ahead. Best of luck :-)Mylander
@GaryMcGill is so damn right. First time using installshield is a horrible nightmare in comparison with the previously available setup projects. Good luck ;)Manslaughter

© 2022 - 2024 — McMap. All rights reserved.