 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Mark Garnett Guest
|
Posted: Sun Jan 23, 2005 6:38 am Post subject: Getting the folder path for an Outlook 2000 folder |
|
|
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 |
|
 |
|
|
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
|
|