Save Changes Dialog although ActiveDocument.Saved was set True

A

Armin Laschet

Hi all,

for three weeks I'm working with VBA in W2K/Office2000.

I created a document in Word with fields (links) and use the two
procedures:

Private Sub Document_Open()
Dim fld As Field

' Here I will have a routine to check
' whether a fields update is necessary

For Each fld In ActiveDocument.Fields
If fld.Type = wdFieldLink Then
fld.Update
End If
Next fld

ActiveDocument.Saved = True
End Sub

Private Sub Document_Close()

Debug.Print ActiveDocument.Saved ' = 'False'

End Sub

So I update the fields "manually" and set the 'Saved' property to
'True', in order to have the Save Changes Dialog on closing only if
(further) changes have been made to the document. To my surprise, the
dialog is shown every time I close the document, as the 'Saved'
property is always set to 'False'.
Does anyone know why that's so? Is there any other way to check whether
changes have been made after the fields update?

Armin
 
A

Armin Laschet

Testing the document/code - this time I get 'True' for
'ActiveDocument.Saved' in Sub Document_Close(), but still the save
dialog pops up, asking, if I want to save the changes, although I
haven't made any.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top