
Signature
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Hi Jay,
I had set the option setting as in Tools > Options > Save, check the box
"Prompt for document properties. But Word still does not prompt me whenever
I'm trying to re-save an existing documents. btw, what do you means by "if
the document is dirty when you close it, that will cover all the bases."
Regards
> > Hi,
> > I'm in no way a programmer but I have a programming type query.
[quoted text clipped - 12 lines]
> the box "Prompt for document properties". Since Word will prompt for a save
> if the document is dirty when you close it, that will cover all the bases.
Klaus Linke - 19 Aug 2005 23:19 GMT
Hi Ronnie,
The option setting only forces the file properties dialog the first time you
save a doc (and not every time the doc has changed = "is dirty", as Jay
likely assumed).
You'd need an AutoClose macro -- The one below isn't terribly elegant, but
avoids dealing with event handlers:
Sub AutoClose()
Dim myDoc As Document
Set myDoc = ActiveDocument
Application.EnableCancelKey = wdCancelDisabled
If ActiveDocument.Saved = False Then
Select Case _
MsgBox("Do you want to save the changes?", _
vbQuestion + vbYesNoCancel, _
myDoc.Name)
Case vbYes
Dialogs(750).Show
myDoc.Save
myDoc.Close
Case vbNo
myDoc.Saved = True
myDoc.Close
Case vbCancel
SendKeys "{ESC}"
End Select
Else
myDoc.Close
End If
Application.EnableCancelKey = wdCancelInterrupt
End Sub
Greetings,
Klaus
> Hi Jay,
> I had set the option setting as in Tools > Options > Save, check the box
[quoted text clipped - 23 lines]
>> if the document is dirty when you close it, that will cover all the
>> bases.