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 

Need Outbox ImapIFolder from IMsgStore

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





PostPosted: Fri Jul 21, 2006 8:02 pm    Post subject: Need Outbox ImapIFolder from IMsgStore Reply with quote



I am using some sample code. I have a IMsgStore object. I need to call its
OpenEntry to get the IMapIFolder object of the type Outbox.

The sample code uses some sort of treeview to and enumfolders to get all the
folders. I don't want any visual control but want to do it directly. I am
not able to figure out the treeview filling and hence the question.

Thanks.
Back to top
Dmitry Streblechenko
Guest





PostPosted: Fri Jul 21, 2006 9:55 pm    Post subject: Re: Need Outbox ImapIFolder from IMsgStore Reply with quote



If you only need the Outbox, read the PR_IPM_OUTBOX_ENTRYID property from
IMsgStore, then use its value to call IMsgStore::OpenEntry.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Sanjay" <skanade (AT) eth (DOT) net> wrote in message
news:44c0e9c8$1 (AT) newsgroups (DOT) borland.com...
Quote:
I am using some sample code. I have a IMsgStore object. I need to call its
OpenEntry to get the IMapIFolder object of the type Outbox.

The sample code uses some sort of treeview to and enumfolders to get all
the folders. I don't want any visual control but want to do it directly. I
am not able to figure out the treeview filling and hence the question.

Thanks.
Back to top
Sanjay
Guest





PostPosted: Fri Jul 21, 2006 10:49 pm    Post subject: Re: Need Outbox ImapIFolder from IMsgStore Reply with quote



Dmitry,

Thanks. It started working. There is a code to bring up the Outlook New
message form and it works now. Is it possible to put an RTF body and a
subject in this form? Currently, it comes up blank.

BTW, I looked up Redemption but don't know enough to find out if it will
work for me. I have a simple requirement. My application keeps RTF data. I
want to be able to bring up an Outlook New message form with RTF data
prefilled in the body and also a subject text of my choice. Also, will it be
possible to do the same thing with Eudora MAPI?

Thanks,
Sanjay
Back to top
Dmitry Streblechenko
Guest





PostPosted: Fri Jul 21, 2006 11:31 pm    Post subject: Re: Need Outbox ImapIFolder from IMsgStore Reply with quote

On the Extended MAPI level, you will need to set the PR_RTF_COMPRESSED_BODY
property (see WrapCompressedRTFStream on MSDN), then call RtfSync.
All of this is very easy to do in Redemption. Off the top of my head:

var Session, Message : OleVariant;
....
Session:=CreateOleObject('Redemption.RDOSession');
Session.Logon('some profile name');
Message:=Session.GetDefaultFolder(4{olFolderOutbox}).Items.Add
Message.Subject:='test subject';
Message.RtfBody:=YourRtfText;
Message.Display(TRUE); //make it modal

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Sanjay" <skanade (AT) eth (DOT) net> wrote in message
news:44c110d8$2 (AT) newsgroups (DOT) borland.com...
Quote:
Dmitry,

Thanks. It started working. There is a code to bring up the Outlook New
message form and it works now. Is it possible to put an RTF body and a
subject in this form? Currently, it comes up blank.

BTW, I looked up Redemption but don't know enough to find out if it will
work for me. I have a simple requirement. My application keeps RTF data. I
want to be able to bring up an Outlook New message form with RTF data
prefilled in the body and also a subject text of my choice. Also, will it
be possible to do the same thing with Eudora MAPI?

Thanks,
Sanjay
Back to top
Sanjay
Guest





PostPosted: Sat Jul 22, 2006 6:02 pm    Post subject: Re: Need Outbox ImapIFolder from IMsgStore Reply with quote

Amazing! Questions:

1) What happens if proper Outlook is not installed on the user system. Does
it give a message by itself?

2) Suppose the user uses some other email software instead of Outlook, for
example, Eudora that also supports RTF. Will it work with that too?

Thanks.
Back to top
Dmitry Streblechenko
Guest





PostPosted: Sun Jul 23, 2006 1:27 am    Post subject: Re: Need Outbox ImapIFolder from IMsgStore Reply with quote

1. RDO family of objects only require the Extended MAPI system to be
installed, which is installed by Outlook, Exchange Server or Exchange Admin
Console.
2. Nope, Eudora does use or install Extended MAPI.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Sanjay" <skanade (AT) eth (DOT) net> wrote in message
news:44c21f0b$1 (AT) newsgroups (DOT) borland.com...
Quote:
Amazing! Questions:

1) What happens if proper Outlook is not installed on the user system.
Does it give a message by itself?

2) Suppose the user uses some other email software instead of Outlook, for
example, Eudora that also supports RTF. Will it work with that too?

Thanks.
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.