Microsoft KB Archive/247282

= OFFICESE: How to Count the Number of Discussions in an Office 2000 Document =

Article ID: 247282

Article Last Modified on 2/19/2007

-

APPLIES TO


 * Microsoft Excel 2000 Standard Edition
 * Microsoft Office 2000 Server Extensions
 * Microsoft PowerPoint 2000 Standard Edition
 * Microsoft Word 2000 Standard Edition

-



This article was previously published under Q247282



SUMMARY
In Microsoft Office, the Microsoft Office Server Extensions (OSE) library enables you to programmatically control objects in Discussions and DiscussionServers collections. You can use the Count property of the Discussions collection to return the number of discussions in a document that is hosted on a Web server extended with Microsoft Office 2000 Server Extensions.



MORE INFORMATION
The Count property returns the number of items in the specified collection. The Count property does not count recursively, however, and any discussions that are replies to a Discussion object are not included in the count.

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.

NOTE: You must add a reference to the OSE Object model. To do this, follow these steps:
 * 1) Start the Visual Basic Editor (VBE) by pressing ALT+F11 from within one of the Office programs.
 * 2) On the Tools menu, click References.
 * 3) In the Available References list box, select the Microsoft Office Server Extensions 1.0 Object Library check box.
 * 4) Click OK.

Sub Count_Discussions Dim dscDiscussions As Discussions ' is the name of the Discussion Server _ where the document is stored. ' is the name of the document. Set dscDiscussions = OpenDiscussions("http:///") MsgBox "There are " & dscDiscussions.Count & " discussions in this document." End Sub

Additional query words: XL2000 VBA2000 OSE oseclient focusteam

Keywords: kbdtacode kbhowto KB247282

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.