Migration to Office 2016 RRS feed

  • Question

  • Hi all,

    we have a c++ dll that we use from vba within Excel. We have been developing this library for a long time and have compiled against previous versions of Office (2007-2010). We are now trying to compile it against Excel 2016 but so far we have issues with the tlh/tli that are generated. This is part of the header file:

    #undef DialogBox
    #undef RGB
    #ifdef __EXCEL2016__
    #import "C:\Program Files (x86)\Common Files\microsoft shared\OFFICE15\MSO.DLL"  
    #import "C:\Program Files (x86)\Common Files\microsoft shared\VBA\VBA6\VBE6EXT.OLB"  
    #import "C:\Program Files (x86)\Microsoft Office\root\Office16\EXCEL.EXE" exclude("IFont", "IPicture") no_dual_interfaces
    #ifdef __EXCEL2010__
    #import "C:\Program Files (x86)\Common Files\microsoft shared\OFFICE14\MSO.DLL"
    #import "C:\Program Files (x86)\Common Files\microsoft shared\VBA\VBA6\VBE6EXT.OLB"
    #import "C:\Program Files (x86)\Microsoft Office\Office14\Excel.exe"

    The erros that we get are somtehing like this:

    2>c:\quants\vsprojects2013\excel\debug\excel.tlh(32533): error C2039: 'MsoGraphicStyleIndex' : is not a member of 'Office'
    2>c:\quants\vsprojects2013\excel\debug\excel.tlh(32533): error C2146: syntax error : missing ';' before identifier 'GetGraphicStyle'
    2>c:\quants\vsprojects2013\excel\debug\excel.tlh(32533): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    2>c:\quants\vsprojects2013\excel\debug\excel.tlh(32533): warning C4183: 'GetGraphicStyle': missing return type; assumed to be a member function returning 'int'
    2>c:\quants\vsprojects2013\excel\debug\excel.tlh(32535): error C2027: use of undefined type 'Excel::Office'
    2>          c:\quants\vsprojects2013\excel\debug\excel.tlh(32533) : see declaration of 'Excel::Office'

    Can you help us?



    Friday, August 17, 2018 8:07 AM

All replies