StoreArticle Method

Retrieve an article from the current newsgroup and store it in a local file.

Syntax

object.StoreArticle( Article, FileName )

Remarks

The StoreArticle method retrieves an article from the server and stores it in a file on the local system. The contents of the article is stored as a text file, using the specified file name. This method will cause the current thread to block until the message transfer completes, a timeout occurs or the transfer is canceled. During the transfer, the OnProgress event will fire periodically, enabling the application to update any user interface objects such as a progress bar.

Article
Number of the article to retrieve from the server. This value must be greater than zero. The first available article in the newsgroup can be determined by checking the value of the FirstArticle property. The last available article in the newsgroup is returned by the LastArticle property.
FileName
Pointer to a null-terminated string which specifies the file that article is to be stored in. If an empty string is passed as an argument, the article is copied to the system clipboard.

Return Value

A value of zero is returned if the method was successful. Otherwise, a non-zero error code is returned which indicates the cause of the failure.

See Also

GetArticle Method, OpenArticle Method


Copyright © 2008 Catalyst Development Corporation. All rights reserved.