How to Destroy Word Documents

Written by launie sorrels
  • Share
  • Tweet
  • Share
  • Email

Destroying a Word document is not the same thing as deleting one. When a user deletes a document, he removes the file from the hard drive. Destroying a document is when developers remove the document from memory. A programmer will open a document in memory and make needed changes before closing and deleting the document. When he opens the document it does not open visually; instead the document is hidden at a memory address. If the document is not destroyed then it will continue to reside in that memory address.

Skill level:

Other People Are Reading


  1. 1

    Write the code to open the Word document and make whatever changes you need.

  2. 2

    Locate the ending of the code where you close the document.

  3. 3

    Destroy the Word document with the following code:

    Set doc Name = nothing

    The doc Name is the name of the Word document you have been working with.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.