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

major issue in outlook "Change in forward mail also change selected mail "



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old November 7th 09, 11:08 AM posted to microsoft.public.outlook.program_addins
Varun
external usenet poster
 
Posts: 5
Default major issue in outlook "Change in forward mail also change selected mail "

outlook change the body of selected mail if we change body of forward mail.
I have a sample application which i got from following site.
http://www.codeproject.com/KB/COM/outlookaddin.aspx
I attach the project on rapidshare, please get it from
http://rapidshare.com/files/302193923/sample1.rar.html
..
In this application i register inspector event. When select a mail in
outlook click on forward button it calls onnewinspector
here i change mailbody and return. After that i found mail body is also
change in selected mail.
So i think it's serious issue in Outlook.
In Onnewinspector below code change body

HRESULT CAddin::Invoke(DISPID dispidMember,REFIID riid,LCID lcid, WORD
wFlags,
DISPPARAMS* pDispParams, VARIANT* pvarResult,
EXCEPINFO* pExcepInfo, UINT* puArgErr)
{

if(dispidMember = 0xf001)
{
if (!pDispParams)
return E_INVALIDARG;

if (pDispParams-cArgs 0)
{
IDispatchPtr pDisp(pDispParams-rgvarg[0].pdispVal);
CComQIPtr_Inspector spInspector(pDisp);
IDispatchPtr dsptr = NULL;
spInspector-get_CurrentItem(&dsptr);
_MailItemPtr mptr = NULL;
mptr = dsptr;
_bstr_t bd = "this is new body";
if(mptr)
{
RecipientsPtr rptr = NULL;
mptr-get_Recipients(&rptr);
if(rptr)
{
long count = 0;
rptr-get_Count(&count);
if(count == 0)
mptr-put_Body(bd);
mptr = NULL;
}
}
}
}
return S_OK;
}



 




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
Is it possible to change the "mail received" sound in Outlook ? geofg Outlook - Installation 6 November 10th 09 10:27 AM
Change "Mail Folders" font in Outlook 2007 NewsReader2k Outlook - General Queries 1 January 12th 09 05:49 PM
How to change "E-mail Account" on Calendar items? Neicy Outlook - Calandaring 0 January 2nd 09 05:42 PM
Outlook issue: change "view" on all folders at one time LynnZ Outlook - Calandaring 1 April 12th 06 11:39 PM
Only when i forward emails with attachements "550 relaying mail to" [domain] "is not allowed" Alchemy Outlook - General Queries 4 March 8th 06 11:47 PM


All times are GMT +1. The time now is 09:12 AM.


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.