You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
44<br />
gwCabinet:=gwAccount.Cabinet;<br />
try<br />
gwCabinet.Folders.Add(MainFolder);<br />
except<br />
ShowMessage('Error Adding Folder');<br />
end;<br />
end;<br />
Folders.Add(SharedMessage as SharedNotification, [Name as String])<br />
This method creates a shared folder based on the SharedNotification object that is<br />
passed in as the first parameter. Name will set the Folder.Name property of the<br />
newly created folder. For more information on Shared Folders, see below.<br />
Getting at the Contents of a Folder<br />
One of the main reasons for wanting to access a GroupWise folder is to get at the<br />
messages contained within. To that end, look at a folder as the collection of<br />
message and subfolders that it contains. To access the messages in a folder, you<br />
have several options:<br />
First, you can access the Folder.Messages property, which returns all of the<br />
messages contained within the folder in a Messages collection.<br />
Second, you can use the Folder.FindMessages() method.<br />
Folder.FindMessages(Condition)<br />
This method takes one parameter; a variant called Condition. Condition may be a<br />
string filter expression or a previously created Filter object. For more<br />
information on Conditions and how to create them, see Chapter 8: Understanding<br />
Field and Field Related Objects.<br />
Because the Messages collection object returned by Folder.Messages takes<br />
more resources and is slower than a MessageList object returned by<br />
Folder.FindMessages(), you should use Folder.FindMessages() when you<br />
can. However, if you have already instantiated a Messages object using the<br />
Folder.Messages property, feel free to do so again without concern about<br />
performance.<br />
The following sample searches the Mailbox Folder for messages that include the<br />
word “the”. It then displays the number of messages found.<br />
www.novell.com/appnotes