Holds a collection of News server articles existing within a specified group.
Gives the total number of article objects in a particular articles collection.
Object.Count
Long.
Read-only.
This example outputs the total number of article objects present in a particular articles collection.
’Gets the groups available on the server
Set news =CreateObject("UCX:INews.news")
’Set the IP address
news.Server = "164.99.150.93"
’Establish connection with the server
news.Connect()
Set groups = news.Groups()
Set group = groups.Item("Test")
Set articles = group.Articles()
print articles.Count
Indicates whether there are any more article objects existing in the specified articles collection.
Object.HasMoreElements
Boolean.
Read-only.
This example indicates whether there are any more article objects present in the articles collection in the group Test and returns the subject of that article.
’Gets the groups available on the server
Set news=CreateObject("UCX:INews.news")
’Set the IP address
news.Server = "164.99.150.93"
’Establish connection with the server
news.Connect()
Set groups = news.Groups
Set group = groups.Element("Test")
Set articles = group.Articles
Status = articles.Hasmoreelements
Print Status
Fetches the article objects corresponding to the specified key values.
Object.Element( Key As Variant)
Article object.
This example fetches the article object from corresponding to the key value "Test", from the group Test and returns the subject of the article.
’Gets the groups available on the server
Set news =CreateObject("UCX:INews.news")
’Set the IP address
news.Server = "164.99.150.93"
’Establish connection with the server
news.Connect()
Set groups = news.Groups()
Set group = groups.Element("Test")
Set articles = group.Articles()
Set article = articles.Element("Test")
print article.Subject
Returns the article objects corresponding to the specified key values.
Object.Item( Key As Variant)
Article object.
This example fetches the article object corresponding to the key value "Test, from the group Test and returns the date on which the article was created.
’Gets the groups available on the server
Set news =CreateObject("UCX:INews.news")
’Set the IP address
news.Server = "164.99.150.93"
’Establish connection with the server
news.Connect()
Set groups = news.Groups()
Set group = groups.Element("Test")
Set articles = group.Articles()
Set articles = group.Articles()
Set article = articles.Item("Test")
print article.Date
Fetches the next article object from the specified articles collection.
Object.Next()
None.
Article object.
This example fetches the next article object from the specified articles collection in the group Test and returned the subject of the article.
’Gets the groups available on the server
Set news=CreateObject("UCX:INews.news")
’Set the IP address
news.Server = "164.99.150.93"
’Establish connection with the server
news.Connect()
Set groups = news.Groups
Set group = groups.Element("Test")
Set articles = group.Articles
articles.Reset()
While articles.Hasmoreelements
Set article =articles.Next()
Print article.Subject
Wend
Resets the current object pointer to the initial point of the articles collection.
Object.Reset()
None.
None.
When the Next method is called after Reset method, it will fetch the first article object from the collection.
This example resets the pointer to the initial point of the specified articles collection in the group Test and returns the subject of the current article.
’Gets the groups available on the server
Set news=CreateObject("UCX:INews.news")
’Set the IP address
news.Server = "164.99.150.93"
’Establish connection with the server
news.Connect()
Set groups = news.Groups
Set group = groups.Element("Test")
Set articles = group.Articles
articles.Reset()
If(err.Number = 0) Then
Print "The collection is Reset"
Else
Print "Unable to reset the collection"
End if