| Visual Basic (Declaration) | |
|---|---|
Public Sub Dispose() | |
| C# | |
|---|---|
public void Dispose() | |
Calling Dispose() on the Document object disposes of all objects contained in that Document object. Therefore, it is necessary to remove any items which will still need to be used prior to calling the Dispose() method. Similarly, to obtain access to any Pages in the Document object's Pages collection, those Pages need to be removed from the Pages collection prior to calling the Dispose() method of the Document object.
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family