Visual Studio 2017 VB.Net Office 2010 Compatibility Issues - vb.net

I created a program in Visual Studio 2017 using VB.net, which takes form data and creates a Word document with an Excel graph. I am running Win 10 and Office 2016. I have successfully run the program on Windows 7 - 10 (32 or 64) on both Office 2013 and Office 2016. However, I need the program to run on a Win 10, Office 2010 machine. Any version of Windows with Office 2010 simply says the program/app has stopped running.
Per what I have found on this site and other sites, it appears that such a program can run on Office 2010 with a certain .NET version and Visual Studio 2010 Tools for Office Runtime installed. Here is the link:
https://msdn.microsoft.com/en-us/library/bb772080.aspx
I have tried installing these on multiple systems, but it seems to make no difference in the result. I used the Event Viewer to see what was going on, and it looked like there was some security setting preventing the program from operating with Word and Excel, but when I changed the security settings in those two programs per advice received elsewhere, I still got the same result.
My searching leads me to believe there is a solution, and a simple one at that, but it has eluded me. Thanks in advance for advice.

My code worked fine on computers with Office 2013 or 2016, but some changes made from 2010 to 2013 lead some of my code to be invalid when trying to operate on computers running Office 2010. The Word code was fine, but the Excel code had three issues. Here is what they were and how I fixed them:
Office 2010 and before do not allow Excel data label width modifications, so I compensated by increasing the overall width of the chart.
The method FullSeriesCollection for my Excel Series was not valid for Office 2010, so I used the method SeriesCollection instead.
I had to put my variable for the Excel chart range above my variable for the Excel chart. I'm not sure exactly why this was needed, because it worked fine in Office 2013 & 2016.

Related

Can't find Word 2010 Document template in Visual Studio

I have VS 2013 installed and Microsoft Office 2010 and I want to create a new project using Word 2010 document as my template, but I don't see the option for this version. Only Word 2013 Document template is available, but since I don't have it installed I get an error Cannot create project because the application associated with this project type is not installed on this computer. You must install the Microsoft Office application that is associated with this project type. Can I use a 2010 Word template, if so how?
You can use the very helpful answer in the below link:
VSTO Tools: Office 2010 to 2013 upgrade
I think you can try only one of the points mentioned in the answer:
Under the
Project\ProjectExtensions\VisualStudio\FlavorProperties\ProjectProperties
element find the "OfficeVersion" attribute/value pair and remove it
(so the attribute that reads OfficeVersion="14.0" -- delete that). --
Leave all other 14.0s intact, if anything got changed to 15.0,
downgrade it back to 14.0 (and again, if it's a reference, set
SpecificVersion to false). -- Do not worry about changing any GUIDs,
just leave them as they are!
Let me know if that works for you.

Cannot use Date and Time Picker in Office 2013

Since few days I have tried to apply this ActiveX to my Excel 2013.
I made small app for running reports in Excel and I need some way to pick start and end date.
Easiest way to do it was Date And Time Picker Control which is in %windir%\syswow64\mscomct2.ocx.
It worked perfectly at Windows 7 64-bit + Excel 2010 32-bit.
When I moved my project to other PC with Windows 7 64-bit and Office 2013 32-bit it stopped working. Firstly there was class missing, so I registered Microsoft Windows Common Controls 2 6.0 (SP3) in syswow64 using regsvr32.exe command.
It did not help - it was keep saying "cannot insert object".
Tried another versions of Common Controls (currently SP6), but problem is still there - I can`t put any control to my Excel worksheet.
I`m running out of ideas and tutorials, so maybe some of You had ran into this type of problem and have solution?
It's best that you just abandon your search for a Microsoft solution. They haven't updated the common controls for 64-bit. Your best options are to create your own ActiveX Control by wrapping the Date And Time Picker Control from .Net or communicate using COM and expose the features that you want, or use one of the custom VBA solutions that can be found on Ron de Bruin's Calendar/Date Picker page.
I've used this one - Calendar Control for All Office versions - including Office 2010 64 bit
but this one looks better IMO - A Pop-up Calendar for Excel 2007 and up
Even if you can get it running on your machine, if you work at a large company, like myself, you'll never get IT to deploy the fix to everyone.
Edit: was getting confused with MSCOMCTL.OCX issues

VBA codes developed in Excel 2003

I just need to ask to what degree Macros developed in Excel 2003 are compatible with Excel 2010 and 2013?
I would tend to think that there would be some issues, but from your experience, what percentage of macros developed in Excel 2003 can work in Excel 2010/2013?
The issue you are going to have is with 32/64 bit compatibility. Office 2003 is 32-bit only; starting with Office 2007, some versions are 64-bit.
Microsoft has a pretty good writeup of the issues on this page.
You should do some online searches for VBA features that were "deprecated" after Excel 2003. The single major feature that no longer works is Application.FileSearch
Just from msdn.microsoft.com:
Excel 2010 Object Model Changes Since Earlier Versions
What's New in Excel 2010
New Objects, Collections, and Enumerations_Excel.Dev
New Members and Constants_Excel.Dev
Tables of VBA Object Model Changes
VBA Object Model Changes
Word 2010 Object Model Changes Since Earlier Versions
What's new for VBA developers in Project 2013
And so on ...

Mac Office 2008 Development- AppleScript vs. VBA

I'm looking for some advice from anyone who has experience writing addons for PowerPoint on both Windows and Mac machines.
We have a Windows Office 2007 addon (.NET) that we'd like to port to the Mac.
Thus, in PowerPoint 2008 for the Mac, we require the following functionality:
Ribbon/Fluent extensibility
Custom Task Panes
Read/write custom document properties
Save slides as images
Read text and shape information from slides
Get notification of the following PowerPoint application events; `SlideSelectionChanged`, `PresentationClose` and `AfterPresentationOpen`.
I am hoping someone with experience writing Office addons for Windows and Mac, can advise.
This doesn't solve your problem if you need to specifically do this in 2008, but Office 2011 is coming and it brings back VBA. Spending the effort to convert your stuff to AppleScript might be a lot of work for little return where you could wait for Office 2011 which brings the Ribbon to Mac Office as well as VBA...
http://www.computerworld.com/s/article/9085678/Microsoft_will_bring_back_macros_to_Mac_Office_in_2011

Integration with Office 2007 VBA and Visual SourceSafe

I'm wondering if there's a way to manage VBA code authored in Excel 2007 using Visual SourceSafe? Office XP and 2000 apparently had 'developer additions' that supported this (e.g. http://msdn.microsoft.com/en-us/library/aa164419(office.10).aspx). Is this support missing in Office 2007?
The Office XP VSS addin worked fine in Excel 2007 last time I tried it (been a couple of years). It's really a VBA addin, and VBA hasn't changed much since Excel 2000 (eg, registered addins work across versions). You might need an MSDN subscription to download it, though- that's where I got it.