Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor
 
Posts: n/a
Default Changed document, want to close without prompt to save

You are welcome, though I would still treat such a macro with caution.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


-----Original Message-----
From: Stan Brown ]
Posted At: 22 June 2006 04:08
Posted To: microsoft.public.word.newusers
Conversation: Changed document, want to close without prompt to save
Subject: Changed document, want to close without prompt to save


Wed, 21 Jun 2006 08:37:46 +0300 from Graham Mayor :
A minor addition to Stefan's macro will limit the macro to

the one document.
[snip]

Excellent! Thanks, Graham!

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/





  #2   Report Post  
Posted to microsoft.public.word.newusers
Stan Brown
 
Posts: n/a
Default Changed document, want to close without prompt to save

Thu, 22 Jun 2006 10:24:02 +0300 from Graham Mayor
:
You are welcome, though I would still treat such a macro with caution.


Just to clarify, there's no way to set a particular document "Don't
ask to save changes when closing me", right?

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
  #3   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor
 
Posts: n/a
Default Changed document, want to close without prompt to save

No - the macro is as close as you will get. You could tie it to a particular
version of that file by adding the path eg

Sub DoNotSaveChanges()
Dim strName As String
strName = ActiveDocument.FullName
If strName = "c:\path\Document name.doc" Then
ActiveDocument.Close savechanges:=False
End If
End Sub

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Stan Brown wrote:
Thu, 22 Jun 2006 10:24:02 +0300 from Graham Mayor
:
You are welcome, though I would still treat such a macro with
caution.


Just to clarify, there's no way to set a particular document "Don't
ask to save changes when closing me", right?



  #4   Report Post  
Posted to microsoft.public.word.newusers
Doug Robbins - Word MVP
 
Posts: n/a
Default Changed document, want to close without prompt to save

In the template from which the document is created, create macros with the
names:

FileClose()
FileCloseAll()
FileCloseorCloseAll()
FileCloseorExit()
FileExit()

each of which contain the command

ActiveDocument.Close wdDoNotSaveChanges



--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Stan Brown" wrote in message
t...
Thu, 22 Jun 2006 10:24:02 +0300 from Graham Mayor
:
You are welcome, though I would still treat such a macro with caution.


Just to clarify, there's no way to set a particular document "Don't
ask to save changes when closing me", right?

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/



  #5   Report Post  
Posted to microsoft.public.word.newusers
Stan Brown
 
Posts: n/a
Default Changed document, want to close without prompt to save

Thu, 22 Jun 2006 16:44:13 +0300 from Graham Mayor
:
Stan Brown wrote:
Thu, 22 Jun 2006 10:24:02 +0300 from Graham Mayor
:
You are welcome, though I would still treat such a macro with
caution.


Just to clarify, there's no way to set a particular document "Don't
ask to save changes when closing me", right?


No - the macro is as close as you will get. You could tie it to a particular
version of that file by adding the path eg

Sub DoNotSaveChanges()
Dim strName As String
strName = ActiveDocument.FullName
If strName = "c:\path\Document name.doc" Then
ActiveDocument.Close savechanges:=False
End If
End Sub


Thanks, Graham. At least now I know. :-)

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Irritating "Save" prompt when nothing has changed jl Microsoft Word Help 0 March 20th 06 04:28 PM
Those weird and wacky MS Word messages Larry New Users 11 July 23rd 05 12:18 AM
Templates gman Page Layout 17 April 22nd 05 06:35 PM
do i save the document template or not (urgent) NP New Users 2 April 15th 05 11:47 AM
Stopping Save As Dialog appearing when closing a document N. Cotton Microsoft Word Help 1 January 13th 05 09:46 PM


All times are GMT +1. The time now is 05:30 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"