Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
tcebob
 
Posts: n/a
Default Close Word with macro?

Can one write a macro to quietly close Word, with no user intervention?

rs


  #2   Report Post  
Posted to microsoft.public.word.newusers
Charles Kenyon
 
Posts: n/a
Default Close Word with macro?

Yes.
What is it you are trying to accomplish? Version(s) of Word?
You may want to post this in the vba.beginners group.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!

My criminal defense site: http://addbalance.com
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.


"tcebob" handle @ gwi.net wrote in message
...
Can one write a macro to quietly close Word, with no user intervention?

rs




  #3   Report Post  
Posted to microsoft.public.word.newusers
tcebob
 
Posts: n/a
Default Close Word with macro?

Charles,

That's a good news--bad news type of response. I like "yes" but only speak a few words of
vba. I will open the .beginners group and see how the wind blows.

The problem relates to a recent post of mine, "Word not closing right under Scheduler."
Scheduler opens a specific file, time.doc, and an hour later attempts to close it. This
creates an error condition and the Notify Microsoft window appears and has to be dismissed
manually. Don't know what would happen if I left the computer unattended until the next
Event time, 4 hours later. So, asking Scheduler to do more than simply closing Word is not
possible.

But, if I had the subject macro loaded and ran it upon startup of Word, I'm betting that
there is a timer reactor somewhere in vba that would delay the execution for, say, 2
hours.

Thanks,

rs


"Charles Kenyon" wrote in message
...
: Yes.
: What is it you are trying to accomplish? Version(s) of Word?
: You may want to post this in the vba.beginners group.
: --
: Charles Kenyon
:
: Word New User FAQ & Web Directory: http://addbalance.com/word
:
: Intermediate User's Guide to Microsoft Word (supplemented version of
: Microsoft's Legal Users' Guide) http://addbalance.com/usersguide
:
: See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
:
: My criminal defense site: http://addbalance.com
: --------- --------- --------- --------- --------- ---------
: This message is posted to a newsgroup. Please post replies
: and questions to the newsgroup so that others can learn
: from my ignorance and your wisdom.
:
:
: "tcebob" handle @ gwi.net wrote in message
: ...
: Can one write a macro to quietly close Word, with no user intervention?
:
: rs
:
:
:
:


  #4   Report Post  
Posted to microsoft.public.word.newusers
tcebob
 
Posts: n/a
Default Close Word with macro?

Holy crabapples, it works! Here's the script (cribbed shamelessly from Help):

Sub ExitTime()
'
'Wait for 1 hour then exit word.
'
Dim PauseTime, Start
PauseTime = 3600 ' Set duration.
Start = Timer ' Set start time.
Do While Timer Start + PauseTime
DoEvents ' Yield to other processes.
Loop
Application.Quit SaveChanges:=wdDoNotSaveChanges
End
End Sub

Thanks again,

rs


"Charles Kenyon" wrote in message
...
: Yes.
: What is it you are trying to accomplish? Version(s) of Word?
: You may want to post this in the vba.beginners group.
: --
: Charles Kenyon
:
: Word New User FAQ & Web Directory: http://addbalance.com/word
:
: Intermediate User's Guide to Microsoft Word (supplemented version of
: Microsoft's Legal Users' Guide) http://addbalance.com/usersguide
:
: See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
:
: My criminal defense site: http://addbalance.com
: --------- --------- --------- --------- --------- ---------
: This message is posted to a newsgroup. Please post replies
: and questions to the newsgroup so that others can learn
: from my ignorance and your wisdom.
:
:
: "tcebob" handle @ gwi.net wrote in message
: ...
: Can one write a macro to quietly close Word, with no user intervention?
:
: rs
:
:
:
:


  #5   Report Post  
Posted to microsoft.public.word.newusers
Charles Kenyon
 
Posts: n/a
Default Close Word with macro?

Think about your habits (and those of your users) before you implement this!
What other documents are likely to be open? Will changes to those be a good
thing to save, or not? Do you really want to abandon changes to the document
you have been working on?
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!

My criminal defense site: http://addbalance.com
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.


"tcebob" handle @ gwi.net wrote in message
...
Holy crabapples, it works! Here's the script (cribbed shamelessly from
Help):

Sub ExitTime()
'
'Wait for 1 hour then exit word.
'
Dim PauseTime, Start
PauseTime = 3600 ' Set duration.
Start = Timer ' Set start time.
Do While Timer Start + PauseTime
DoEvents ' Yield to other processes.
Loop
Application.Quit SaveChanges:=wdDoNotSaveChanges
End
End Sub

Thanks again,

rs


"Charles Kenyon" wrote in message
...
: Yes.
: What is it you are trying to accomplish? Version(s) of Word?
: You may want to post this in the vba.beginners group.
: --
: Charles Kenyon
:
: Word New User FAQ & Web Directory: http://addbalance.com/word
:
: Intermediate User's Guide to Microsoft Word (supplemented version of
: Microsoft's Legal Users' Guide) http://addbalance.com/usersguide
:
: See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
:
: My criminal defense site: http://addbalance.com
: --------- --------- --------- --------- --------- ---------
: This message is posted to a newsgroup. Please post replies
: and questions to the newsgroup so that others can learn
: from my ignorance and your wisdom.
:
:
: "tcebob" handle @ gwi.net wrote in message
: ...
: Can one write a macro to quietly close Word, with no user
intervention?
:
: rs
:
:
:
:






  #6   Report Post  
Posted to microsoft.public.word.newusers
tcebob
 
Posts: n/a
Default Close Word with macro?

Not a problem. This macro is activated at the shortcut command for this particular
document, or in the Scheduler. Normal Word operation is not affected. Oh, wait, I see your
point; suppose some other document is being edited. Theoretically the operator is supposed
to see the time log pop up, fill in a line and dismiss it. But, of course, operator could
be away drinking lunch or studying the ponies in the rest room. Ok, there must be a way to
activate a document in a completely new run of Word. Or close the Log without closing Word
if there are more documents open.

But. The damn thing still doesn't work, though it works when I test it. It still gags on
something and puts up an error screen.

Back to the drawing board.

rs


"Charles Kenyon" wrote in message
...
: Think about your habits (and those of your users) before you implement this!
: What other documents are likely to be open? Will changes to those be a good
: thing to save, or not? Do you really want to abandon changes to the document
: you have been working on?
: --
: Charles Kenyon
:
: Word New User FAQ & Web Directory: http://addbalance.com/word
:
: Intermediate User's Guide to Microsoft Word (supplemented version of
: Microsoft's Legal Users' Guide) http://addbalance.com/usersguide
:
: See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
:
: My criminal defense site: http://addbalance.com
: --------- --------- --------- --------- --------- ---------
: This message is posted to a newsgroup. Please post replies
: and questions to the newsgroup so that others can learn
: from my ignorance and your wisdom.
:
:
: "tcebob" handle @ gwi.net wrote in message
: ...
: Holy crabapples, it works! Here's the script (cribbed shamelessly from
: Help):
:
: Sub ExitTime()
: '
: 'Wait for 1 hour then exit word.
: '
: Dim PauseTime, Start
: PauseTime = 3600 ' Set duration.
: Start = Timer ' Set start time.
: Do While Timer Start + PauseTime
: DoEvents ' Yield to other processes.
: Loop
: Application.Quit SaveChanges:=wdDoNotSaveChanges
: End
: End Sub
:
: Thanks again,
:
: rs
:
:
: "Charles Kenyon" wrote in message
: ...
: : Yes.
: : What is it you are trying to accomplish? Version(s) of Word?
: : You may want to post this in the vba.beginners group.
: : --
: : Charles Kenyon
: :
: : Word New User FAQ & Web Directory: http://addbalance.com/word
: :
: : Intermediate User's Guide to Microsoft Word (supplemented version of
: : Microsoft's Legal Users' Guide) http://addbalance.com/usersguide
: :
: : See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
: :
: : My criminal defense site: http://addbalance.com
: : --------- --------- --------- --------- --------- ---------
: : This message is posted to a newsgroup. Please post replies
: : and questions to the newsgroup so that others can learn
: : from my ignorance and your wisdom.
: :
: :
: : "tcebob" handle @ gwi.net wrote in message
: : ...
: : Can one write a macro to quietly close Word, with no user
: intervention?
: :
: : rs
: :
: :
: :
: :
:
:
:
:


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
Converting WordPerfect 12 files to Word 2003 Curious New Users 4 May 19th 23 02:48 PM
Reveal codes in a word document FUN101 Microsoft Word Help 4 May 16th 23 08:47 PM
Word should allow to 'divide' page by 3 or 4, not just 2 CandasK Page Layout 2 February 28th 06 10:16 PM
How can Word display full path of a file in the title bar? SAsif Microsoft Word Help 1 January 26th 06 04:32 PM
Macros - Keyboard Commands Janet Microsoft Word Help 6 April 11th 05 05:28 AM


All times are GMT +1. The time now is 06:06 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"