Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

how to add excel and word components in a project without having the error of redefined class?

In my project, I added excel and word components so the NiInclude.h has been added with NiExcelComponents.h and NiWordComponents.h. But when i build my project, there is the error that the CWebOptions class has been redefined in the NiWordDocument.h file. How to do to avoid this error and use the two components?

Thank you for your help.

cyril BROS.
0 Kudos
Message 1 of 2
(3,004 Views)
This is a bug that we fixed in Measurement Studio 7.1. If you are unable or unwilling to upgrade to Measurement Studio 7.1, there is a workaround.

Remove "#include NiWordComponent.h" or "#include NiExcelComponent.h" from the generated NiIncludes.h file and include NiWordComponent.h or NiExcelComponent.h only in the source files that need them. If you want to use Excel and Word from within the same source file, you'll need to refactor your implementation so that you don't need to.
0 Kudos
Message 2 of 2
(2,999 Views)