A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Sending from Word with Outlook COM Addin



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old May 30th 06, 03:44 PM posted to microsoft.public.outlook.program_addins
james
external usenet poster
 
Posts: 8
Default Sending from Word with Outlook COM Addin

I have an ATL/C++ COM Addin that processes the message on the
Application::OnSend Event.

It works without problem using Office2003, in all the different ways a
mail can be sent from the desktop. (Outlook, Word, etc,
Shell|SendTo|Mail Recipient)

It works _most_ of the time using Office XP. The following two
scenarios fail.
1/ Using OfficeXP SP3, with Outlook not active.
Start a word doc, select FIle | Send To | Mail Recepient (As
Attachment) ; enter the recipient details, and hit send.
The addin activates, BUT, the message isn't sent , and the
inspector remains open.
The inspector window can be closed manually.

2/ Using OfficeXP SP3, with Outlook not active.
Right click on, say, a doc on the desktop. Select Send To | Mail
Recipient, enter recipient details and hit send.
The addin activates, BUT, the message isn't sent, and the inspector
remains open.
If the inspector is closed manually, the windows explorer crashes,
....

The code causing problems seems to be the second last line below (note
- error handling code and other functionality removed):
CComPtrOutlook::_Application spApplication;
....
CComPtrOutlook::_NameSpace spSession;
spApplication-get_Session(&spSession);

IUnknown* pUnk = NULL;

spSession-get_MAPIOBJECT(&pUnk);
...
pUnk-Release();

Commenting out the last two lines makes the code that is there work
correctly. (Further functions that need to use the pUnk pointer are
also disabled)

(I need the LPMAPISESSION pointer to access the Primary User's SMTP
address, and don't want any security prompts.)

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
when sending e-mail using word says interface not recgonised!! matt clarke Outlook - General Queries 7 October 21st 08 07:29 PM
Outlook Express Addin Joshua Ellul Add-ins for Outlook 0 May 1st 06 12:00 AM
Sending mail with attachment from my vb6 addin [email protected] Add-ins for Outlook 1 April 27th 06 09:03 AM
A different problem with Outlook Addin Ram Add-ins for Outlook 1 April 24th 06 03:31 PM
Outlook addin help Melbin Outlook - Using Forms 0 January 24th 06 01:12 PM


All times are GMT +1. The time now is 08:53 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.