I've been using Visual Studio 5 / XP and have some code that allows me to talk to Excel. I've just
upgraded to Visual Studio 2005 Professional / Vista and can get all of my code to build except the
Excel stuff. In the old code I had this in my .cpp file:
#import "c:\\program files\\microsoft office\\office\\mso9.dll"\
rename_namespace("MSOFFICE2000")\
rename("DocumentProperties", "DocumentPropertiesXL2000")\
rename("CommandBarsPtr", "CommandBarsPtr2000")
#import "C:\\Program Files\\Common Files\\Microsoft Shared\\VBA\VBA6\\VBE6EXT.OLB"
//no_namespace
#import "c:\\program files\\microsoft office\\office\\excel9.olb"\
rename("DialogBox", "DialogBoxXL")\
rename("RGB","RBGXL")\
rename("DocumentProperties", "DocumentPropertiesXL")\
no_dual_interfaces\
exclude("IFont","IPicture")
How do I get the excel code to work using the new visual c++ / office professional 2007? Do I need
new import commands? If so, what? Or can I just take the .h files generated by the above #imports
and use them in the new environment?
thanks