dexli
9th July 2012, 17:46
Hi All,
I have to automate some tasks by using this M$ Office stuff. With perl and Win32::OLE it works more or less but I think it should be also possible with QT. To start I used the qutlook example from the ActiveQt Examples and nothing works like expected.
1.)
TYPELIBS = $$system(dumpcpp -getfile {00062FFF-0000-0000-C000-000000000046}) from the .pro file do not produce the needed msoutl.h and msoutl.cpp
I have to create them by my self using the output of the above by
dumpcpp.exe "C:\Programme\Microsoft Office\Office12\msoutl.olb" -o msoutl
2.) After that I get the error
In file included from addressview.cpp:43:
msoutl.h:30: error: use of enum 'MsoFeatureInstall' without previous declaration
In file included from addressview.cpp:43:
msoutl.h:3928: error: 'MsoFeatureInstall' in namespace 'Office' does not name a type
msoutl.h:3929: error: 'Office::MsoFeatureInstall' has not been declared
msoutl.h:40484: error: 'MsoFeatureInstall' in namespace 'Office' does not name a type
msoutl.h:40485: error: 'Office::MsoFeatureInstall' has not been declared
msoutl.h:53499: error: 'MsoFeatureInstall' in namespace 'Office' does not name a type
msoutl.h:53505: error: variable or field 'SetFeatureInstall' declared void
msoutl.h:53505: error: 'MsoFeatureInstall' is not a member of 'Office'
msoutl.h:88915: error: 'MsoFeatureInstall' in namespace 'Office' does not name a type
msoutl.h:88921: error: variable or field 'SetFeatureInstall' declared void
msoutl.h:88921: error: 'MsoFeatureInstall' is not a member of 'Office'
From msoutl.h
// Referenced namespace
namespace Office {
class Assistant;
class COMAddIns;
class LanguageSettings;
class AnswerWizard;
enum MsoFeatureInstall; <----- this is the bad guy
class IAssistance;
class CommandBars;
class CommandBar;
}
Because I'm new to C++ I have not the slightes clue what is going wrong and what to do. I'm only looking for a simple way to aviod the use of VBA.
After writing this text I found a suggestion to work arround here http://www.qtcentre.org/threads/8811-Can-t-compile-the-Qutlook-example but the resulting program crashes
\QtSDK\Examples\4.7\activeqt\qutlook\debug\qutlook .exe...ASSERT: "id < 0" in file c:\ndk_buildrepos\qt-desktop\src\activeqt\container\qaxbase.cpp, line 3717
\QtSDK\Examples\4.7\activeqt\qutlook\debug\qutlook .exe beendet, Rückgabewert 3
Oh by the way has someone an idea how to find out the CLSID of Word and Excel ??
Thanks
dexli
I have to automate some tasks by using this M$ Office stuff. With perl and Win32::OLE it works more or less but I think it should be also possible with QT. To start I used the qutlook example from the ActiveQt Examples and nothing works like expected.
1.)
TYPELIBS = $$system(dumpcpp -getfile {00062FFF-0000-0000-C000-000000000046}) from the .pro file do not produce the needed msoutl.h and msoutl.cpp
I have to create them by my self using the output of the above by
dumpcpp.exe "C:\Programme\Microsoft Office\Office12\msoutl.olb" -o msoutl
2.) After that I get the error
In file included from addressview.cpp:43:
msoutl.h:30: error: use of enum 'MsoFeatureInstall' without previous declaration
In file included from addressview.cpp:43:
msoutl.h:3928: error: 'MsoFeatureInstall' in namespace 'Office' does not name a type
msoutl.h:3929: error: 'Office::MsoFeatureInstall' has not been declared
msoutl.h:40484: error: 'MsoFeatureInstall' in namespace 'Office' does not name a type
msoutl.h:40485: error: 'Office::MsoFeatureInstall' has not been declared
msoutl.h:53499: error: 'MsoFeatureInstall' in namespace 'Office' does not name a type
msoutl.h:53505: error: variable or field 'SetFeatureInstall' declared void
msoutl.h:53505: error: 'MsoFeatureInstall' is not a member of 'Office'
msoutl.h:88915: error: 'MsoFeatureInstall' in namespace 'Office' does not name a type
msoutl.h:88921: error: variable or field 'SetFeatureInstall' declared void
msoutl.h:88921: error: 'MsoFeatureInstall' is not a member of 'Office'
From msoutl.h
// Referenced namespace
namespace Office {
class Assistant;
class COMAddIns;
class LanguageSettings;
class AnswerWizard;
enum MsoFeatureInstall; <----- this is the bad guy
class IAssistance;
class CommandBars;
class CommandBar;
}
Because I'm new to C++ I have not the slightes clue what is going wrong and what to do. I'm only looking for a simple way to aviod the use of VBA.
After writing this text I found a suggestion to work arround here http://www.qtcentre.org/threads/8811-Can-t-compile-the-Qutlook-example but the resulting program crashes
\QtSDK\Examples\4.7\activeqt\qutlook\debug\qutlook .exe...ASSERT: "id < 0" in file c:\ndk_buildrepos\qt-desktop\src\activeqt\container\qaxbase.cpp, line 3717
\QtSDK\Examples\4.7\activeqt\qutlook\debug\qutlook .exe beendet, Rückgabewert 3
Oh by the way has someone an idea how to find out the CLSID of Word and Excel ??
Thanks
dexli