Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / August 2005

Tip: Looking for answers? Try searching our database.

Open properties box on close

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mark Cann - 10 Mar 2005 10:43 GMT
Hi,
I'm in no way a programmer but I have a programming type query.

Is it possible to force Word to open the Document Properties box either on
saving the said document or closing the document using macros or vba or
something?

Thanks in advance

MC

Signature

Mark Cann
ICT Adviser

Jay Freedman - 10 Mar 2005 15:10 GMT
> Hi,
> I'm in no way a programmer but I have a programming type query.
[quoted text clipped - 6 lines]
>
> MC

Hi Mark,

All you need is a simple option setting. In Tools > Options > Save, check
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.

Signature

Regards,
Jay Freedman
Microsoft Word MVP          FAQ: http://word.mvps.org

Ronnie - 08 Aug 2005 17:32 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.