BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Read sender email address from outlook with TOutlookapplicat

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
MD-Nika
Guest





PostPosted: Fri Sep 16, 2005 4:02 pm    Post subject: Read sender email address from outlook with TOutlookapplicat Reply with quote



Hi,

I know that this is delphi group, but maybe someone from this group can
help mi.
I am using the TOutlookApplication Component and I need to get a way to

get the email address of the sender.
I am using BCB6 Enterprise.

I have found this code:

Variant objCDO = CreateOleObject("Mapi.Session");
objCDO.Logon("", "", False, False);
objMsg := objCDO.GetMessage(itemOL.EntryID, itemOL.Parent.StoreID);
s := objMsg.Sender.Address;
showmessage(s);

But I can't translate it to C++ :/.
I have tried :
Variant OAA;
OAA = CreateOleObject("Mapi.Session"); <-- in this line is error

I have tried :
Variant OAA, FO;
Variant NS, MI, CDOMsg, CDOSession;

OAA = CreateOleObject("Outlook.Application");
NS = OAA.OleFunction("GetNamespace" , "MAPI");
NS.OleProcedure("Logon", "" , "" ,"TRUE" , "TRUE" );

//in variable id_fol (String) I have myFolder->EntryID
//in variable id_mess (String) I have myMess->EntryID

FO = NS.OleFunction("GetDefaultFolder",
/* wont type int, not String (id_fol) ??? */);

//and what next?? please help me

I need some code in C++.
Could any body please help me.

Thanks.

Sorry for my english ....

Monika

Back to top
Riki Wiki
Guest





PostPosted: Fri Sep 16, 2005 6:53 pm    Post subject: Re: Read sender email address from outlook with TOutlookappl Reply with quote



On 16 Sep 2005 09:02:28 -0700, MD-Nika wrote:

Quote:
Could any body please help me.

Hoi Monika

You need to repost your question on the Borland news server.

Take a look here:
<http://tinyurl.com/8m5nw>
which links to
<http://delphi.wikicities.com/wiki/Delphi_Newsgroups>

Back to top
MD-Nika
Guest





PostPosted: Mon Sep 19, 2005 7:57 am    Post subject: Re: Read sender email address from outlook with TOutlookappl Reply with quote




Quote:
You need to repost your question on the Borland news server.

Thanks for your answer. I try post my question on the Borland news
group.

Monika


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.