Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. ActiveQt Outlook plugin, how to handle the ItemSend event (or the Send event)
Forum Update on Monday, May 27th 2025

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

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 929 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    stephane78
    wrote on last edited by
    #1

    Hi,
    I try to make an outlook plugin.is 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 ?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      stephane78
      wrote on last edited by
      #2

      I have made that:
      header:

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

      .cpp:

      #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)));
      }
      
      QPluginOutlook::~QPluginOutlook()
      {
      	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...

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved