14.6 Article Object

Comprises information about a specific News server article.

14.6.1 Author property

Outputs or sets the name the person who is the author of the specific article or posted it.

Syntax

 Object.Author
 

Type

String.

Attributes

Read-Write.

Examples

Refer to Examples under Post method.

14.6.2 Body property

Returns or sets the body of the article.

Syntax

 Object.Body
 

Type

String.

Attributes

Read-write.

Examples

Refer to Examples under Post method.

14.6.3 ByteCount property

Gives the size of the article (in Bytes).

Syntax

 Object.ByteCount
 

Type

Long.

Attributes

Read-only.

Examples

This example outputs the size of the first article existing under 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.6.4 Date property

Returns or sets the post date.

Syntax

 Object.Date
 

Type

Date.

Attributes

Read-write.

Examples

Refer to Examples under Post method.

14.6.5 LineCount property

Outputs the total number of lines present in the body of the specific article.

Syntax

 Object.LineCount
 

Type

Long.

Attributes

Read-only.

Examples

This example outputs the total number of lines present in the body of the articles present 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
 Set article = group.First
 Print article.author
 print article.linecount
 

14.6.6 MessageID property

Returns or sets the MessageID of the article.

Syntax

 Object.MessageID
 

Type

String.

Attributes

Read-write.

Examples

This example returns the messageID of the first article present 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.messageID
 

14.6.7 NewsGroups property

Returns or sets the Newsgroup in which the article exists.

Syntax

 Object.NewsGroups
 

Type

String.

Attributes

Read-write.

Examples

Refer to Examples under Post method.

14.6.8 Reference property

Returns or sets the message ID of the reference article or the article to which a specified article is replied.

Syntax

 Object.Reference
 

Type

String.

Attributes

Read-write.

Examples

Refer to Examples under Post method.

14.6.9 Subject property

Returns or sets the subject of the article.

Syntax

 Object.Subject
 

Type

String.

Attributes

Read-write.

Examples

Refer to Examples under Post method.

14.6.10 Post method

Sends an article that is created with CreatePostArticle method to the News server.

Syntax

 Object.Post()
 

Parameters

None.

Return values

None.

Remarks

The following properties should be set by the user before posting the article:

Examples

This example posts the article created using the CreatePostArticle () method, under the Newsgroup Test.

 ’Create post article
 Set news = CreateObject("UCX:INews.news") 
 ’Set the IP address
 news.server = "164.99.150.93"
 ’Establish connection with the server
 Status = news.Connect()
 set article = news.createpostarticle()
 article.author =  "Sudha"
 article.body =  "test message"
 article.subject = "testing"
 article.reference = "0"
 ’give the newsgroup in which the article is to be created
 article.newsgroups = "test"
 article.date = cdate(date) 
 print article.date
 article.post()
 ’Post the created article
 Status = article.Post()
 Print "The article creation status: "&status