WD2002: Document with an Embedded Object Prompts for a Save After You Set the Saved Property

This article was previously published under Q325620
This article has been archived. It is offered "as is" and will no longer be updated.
If the Saved property on the Document object is set to True in Microsoft Word, you can stop Word from prompting to save the document when you close the document even if the document is modified. However, if the document contains embedded objects (either standard OLE objects or ActiveX Controls), the Save dialog box can appear even if the Saved property is set to True.
This behavior occurs when the embedded object is modified, but not saved. At this point, the persistent data of the object has yet to be saved to the document. This "dirty" flag is not reset to False when you use the Document.Saved property in Word.

Service Pack Information

This problem is corrected in Office XP Service Pack 3.To resolve this problem, obtain the latest service pack for Microsoft Office XP. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
307841 How to obtain the latest Office XP Service Pack

Hotfix Information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, submit a request to Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site: Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language. After the hotfix is installed, the English version of this fix will have the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
   Date                            Time                                     Size                            File name   -------------------------------------------------------------------------   15-Oct-2002              17:54                                 1,804                           Hotfix.txt   14-Oct-2002              14:47                                 3,132                           Readme.txt   14-Oct-2002              14:42                          5,490,612                           Winword.msp   14-Oct-2002              15:04                          5,632,512                           Winword_admin.msp				
The English version of this fix should have the following file attributes or later:
   Date                          Time                           Version                    Size             File name        ---------------------------------------------------------------------   11-Oct-2002            15:14                   10.0.4608.0        10,598,984             Winword.exe				
NOTE: You must make the following registry changes to enable this functionality. To make the registry changes, follow these steps:
  1. Start Registry Editor.
  2. Locate and then click the following key in the registry:

  3. On the Edit menu, click Add Value and then add the following registry value:

    Value name: EnableSubDocPutSaved
    Data type: DWORD
    Value data: 0x00000001 (Enable) or 0x00000000 (Disable)
  4. Quit Registry Editor.
WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Office XP Service Pack 3.

Steps to Reproduce the Problem

  1. Start Microsoft Word.
  2. Type a line of text and then press ENTER two times.
  3. On the Insert menu, click Object.
  4. On the Create New tab, click to select Microsoft Excel Worksheet from the list of object types.
  5. Click OK to insert the object.
  6. Type a value in cell A1 of the embedded worksheet and then click outside the worksheet to deactivate Excel.
  7. Press ALT+F11 to access the Microsoft Visual Basic for Applications (VBA) editor.
  8. On the Insert menu, click Module to insert a new module.
  9. Paste the following code in the new module:
    Sub SetSaved()  Application.ActiveDocument.Saved = TrueEnd Sub					
  10. Close the VBA editor.
  11. On the File menu, click Save and then save the file as C:\test.doc.
  12. On the File menu, click Close to close the document.
  13. On the File menu, click Open to reopen the document.
  14. Double-click the worksheet and then put a value in cell B1. Click outside the worksheet to deactivate it.
  15. On the Tools menu, click Macro and then click Macros....
  16. Select SetSaved and then click Run to run the macro.
  17. On the File menu, click Close to close the document.

    Notice that you are prompted to save the document.
saved dirty embedded

Article ID: 325620 - Last Review: 10/26/2013 17:18:11 - Revision: 3.3

  • Microsoft Word 2002
  • kbnosurvey kbarchive kbautohotfix kbqfe kbhotfixserver kbbug kbfix KB325620