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 

Getting the folder path for an Outlook 2000 folder

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





PostPosted: Sun Jan 23, 2005 6:38 am    Post subject: Getting the folder path for an Outlook 2000 folder Reply with quote



Hi all,

I'm currently trying to make an application of mine compatible with Outlook
2000 since I have discovered the the FolderPath property does not exist in
the version 9 TLB. What I need to be able to do is build a folder path from
the current folder backward up through the parent folders in the folder
tree. I know I have access to a folders Parent property but being a newbie
Delphi programmer I'm not really sure how to use that vraible once I have
it.

I have some skeleton code below:

function TPST_Engine.GetFolderPath(CurrentFolder: MAPIFolder): string;
var
Path: string;
VarRoot: IDispatch;
ParentFolder: MAPIFolder;
begin
// Get the current folder path. This function is needed to
// maintain compatibility with Outlook 2000
Path := '/' + CurrentFolder.Name;
VarRoot := CurrentFolder.Parent;

// while VarRoot <> // what value is returned here if there is no
parent?????
// How do I use the VarRoot value to set the parent folder to my
ParentFolder <----------- What do I do here???????
// variable

GetFolderPath := Path;
end;

My solution will need to go into the while loop as I don't know before hand
how 'buried' the subfolder may be. So I will need to build up the path
string regardless of how many parents and subfolders there are.

Thanks for any help.

Mark


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.