Important: Please read the Qt Code of Conduct -

ActiveQt Outlook plugin, how to handle the ItemSend event (or the Send event)

  • Hi,
    I try to make an outlook it possible with ActiveQt ?I have made a dll project which include msoutl.h and msoutl.cpp(I used dumpcpp to generate msoutl.h and .cpp) and axcontainer library.
    I want to handle the ItemSend event of Outlook and want to save the attachment files in certains cases and do something with them when the user send a new mail.(I have already tried with another project with ATL but without success)
    I haven't seen in the msoutl.h file the signals or events of Outlook.
    Has someone an idea ?

  • I have made that:

    #include "MSOUTL.h"
    using namespace Outlook;
    #include "qpluginoutlook_global.h"
    #include <QAxObject>
    class QPLUGINOUTLOOK_EXPORT QPluginOutlook:public QAxObject
    	QPluginOutlook(IUnknown * iface, QObject * parent = 0);
    public slots:
    	void OnSend(QAxObject* Item, bool	* Cancel);
    	 Outlook::_Application* _papp;
    #endif // QPLUGINOUTLOOK_H


    #include "qpluginoutlook.h"
    #include <QMessagebox>
    QPluginOutlook::QPluginOutlook(IUnknown * iface, QObject * parent) :QAxObject(iface,parent)
    	_papp = new Outlook::_Application;
    	QObject::connect(_papp, SIGNAL(ItemSend(QAxObject* Item, bool	* Cancel)), this, SLOT(OnSend(QAxObject* Item, bool	* Cancel)));
    	if (_papp)
    		delete _papp;
    void QPluginOutlook::OnSend(QAxObject* Item, bool	* Cancel)
    	QMessageBox::information(0, "activeQt", "OnSend,slot itemsend");

    the dll is not recognized in outlook as a plugin and cannot be loaded.

    otherwise I have made an ATL (microsoft) Outlook plugin project too that runs well but if I link this ATL project with QtCore and QtNetwork the plugin is not loaded in Outlook... and I wanted to reuse network code that I 've made with Qt...

Log in to reply