The DocumentChange event may occur unexpectedly when you run a VBA macro that changes specific story ranges in a Word 2002 document (917052)



The information in this article applies to:

  • Microsoft Word 2002

Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry

SYMPTOMS

When you run a Microsoft Visual Basic for Applications (VBA) macro that changes specific story ranges in a Microsoft Word 2002 document, the DocumentChange event may occur unexpectedly. For example, this problem may occur when the macro edits a header or a footer in the Word 2002 document.

RESOLUTION

How to obtain the hotfix

This issue is fixed in the Word 2002 post-Service Pack 3 Hotfix Package that is dated March 13, 2006. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

916561 Description of the Word 2002 post-Service Pack 3 hotfix package: March 13, 2006

How to enable to hotfix

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.
  1. Exit Word 2002.
  2. Click Start, click Run, type regedit, and then click OK.
  3. Locate and then click to select the following registry subkey:

    HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Word\Options

  4. On the Edit menu, point to New, and then click DWORD Value.
  5. Type NoDocChangeEventOnStoryRange, and then press ENTER.
  6. Right-click NoDocChangeEventOnStoryRange, and then click Modify.
  7. In the Value data box, type 1, and then click OK.
  8. On the File menu, click Exit.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Modification Type:MinorLast Reviewed:7/26/2006
Keywords:kbExpertiseInter kbProgramming kbAutomation KbVBA kbOfficeXPpostSP3fix kbQFE kbbug kbfix kbpubtypekc KB917052 kbAudKnowledgeWorker