14.4 Group Object

Comprises information about a specific News server article.

14.4.1 Articles property

Contains references to a collection of articles in the current group.

Syntax

 Object.Articles
 

Type

Articles collection object.

Attributes

Read-only.

Examples

This example shows a typical context of Articles property.

 ’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("junk")
 Set articles = group.articles
 Print "The number of group objects is "&articles.count
 Print "The group name is "&group.name
 

14.4.2 First property

Returns the first article object from the articles collection in the current group.

Syntax

 Object.First
 

Type

Article object.

Attributes

Read-only.

Examples

This example returns the first article object from the articles collection in the group Test.

 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 "The number of group objects is "&articles.count
 Set article = group.First
 Print article.author
 Print article.bytecount
 

14.4.3 Last property

Returns the last article object from the articles collection in the current group.

Syntax

 Object.Last
 

Type

Article object.

Attributes

Read-only.

Examples

This example returns the bytecount of the last article object from the articles collection in the current group.

 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 "The number of group objects is "&articles.count
 Set article = group.Last
 Print article.author
 Print article.bytecount
 

14.4.4 Name property

Returns the name of the specified group.

Syntax

 Object.Name
 

Type

String.

Attributes

Read-only.

Examples

This example returns the name of the group.

 ’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
 For each group in groups
  Set group = groups.item("junk")
  Set articles = group.articles
  Print "The group name is "&group.name
 Next
 

See Also

14.4.5 PostAllowed property

Indicates whether the specified group allows articles to be posted to the News server.

Syntax

 Object.PostAllowed
 

Type

Boolean.

Attributes

Read-only.

Examples

This example indicates whether the specified group allows articles to be posted to the News server.

 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 "The number of group objects is "&articles.count
 Set article = group.First
 print group.postallowed