A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

on close save as x



 
 
Thread Tools Display Modes
  #1  
Old November 29th, 2008, 04:06 AM posted to microsoft.public.word.docmanagement
Curt
external usenet poster
 
Posts: 132
Default on close save as x

is there a way to save a document by given name(X) on close. This document is
opened for changes to be attached to an e-mail. Want to save as on close so
origional stays as is. Want user to make any changes then click close and
have it save as (X)
Thanks
  #2  
Old November 29th, 2008, 05:43 AM posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
Default on close save as x

See the article "How to save a document using a filename that gets
incremented by 1 each time if the filename already exists" at:

http://www.word.mvps.org/FAQs/Macros...edFilename.htm


--
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

"Curt" wrote in message
...
is there a way to save a document by given name(X) on close. This document
is
opened for changes to be attached to an e-mail. Want to save as on close
so
origional stays as is. Want user to make any changes then click close and
have it save as (X)
Thanks



  #3  
Old November 29th, 2008, 07:16 AM posted to microsoft.public.word.docmanagement
Curt
external usenet poster
 
Posts: 132
Default on close save as x

Guess I didn't state my self clear enough.Looked at the sub recommended. What
I wish to do is to get it to activate when the close button is clicked on. I
know how to do it in excel but not in word. Have tried the following with no
luck copyed this from excel sheet.

Private Sub Document_BeforCloseel As Boolean)

ThisDocument.SaveAs ("c:\parade\X.doc")
(worksheet)
End Sub

"Doug Robbins - Word MVP" wrote:

See the article "How to save a document using a filename that gets
incremented by 1 each time if the filename already exists" at:

http://www.word.mvps.org/FAQs/Macros...edFilename.htm


--
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

"Curt" wrote in message
...
is there a way to save a document by given name(X) on close. This document
is
opened for changes to be attached to an e-mail. Want to save as on close
so
origional stays as is. Want user to make any changes then click close and
have it save as (X)
Thanks




  #4  
Old November 29th, 2008, 08:10 AM posted to microsoft.public.word.docmanagement
Curt
external usenet poster
 
Posts: 132
Default on close save as x

Sub SaveIncrementedFilename()
Dim PathAndFileName As String, n As Long
PathAndFileName = "C:\Parade\E-Mail Attachment.doc"
If Dir("C:\Parade\E-mail Attachment" & ".doc") = "" Then
ActiveDocument.SaveAs ("C:\Parade\E-Mail Attachment.doc" & ".doc")
Else
n = 1
Do While Dir("C:\Parade\E-mail Attachment.doc & n & "".doc") ""
n = n + 1
Loop
ActiveDocument.SaveAs PathAndFileName & n & ".doc"
End If
End Sub

Novice as I am did something wrong as not saving
Thanks

"Doug Robbins - Word MVP" wrote:

See the article "How to save a document using a filename that gets
incremented by 1 each time if the filename already exists" at:

http://www.word.mvps.org/FAQs/Macros...edFilename.htm


--
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

"Curt" wrote in message
...
is there a way to save a document by given name(X) on close. This document
is
opened for changes to be attached to an e-mail. Want to save as on close
so
origional stays as is. Want user to make any changes then click close and
have it save as (X)
Thanks




  #5  
Old November 29th, 2008, 09:03 AM posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
Default on close save as x

See the article "A Pseudo DocumentBeforeClose Event" at:

http://www.word.mvps.org/FAQs/Macros...eforeClose.htm


--
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

"Curt" wrote in message
...
Guess I didn't state my self clear enough.Looked at the sub recommended.
What
I wish to do is to get it to activate when the close button is clicked on.
I
know how to do it in excel but not in word. Have tried the following with
no
luck copyed this from excel sheet.

Private Sub Document_BeforCloseel As Boolean)

ThisDocument.SaveAs ("c:\parade\X.doc")
(worksheet)
End Sub

"Doug Robbins - Word MVP" wrote:

See the article "How to save a document using a filename that gets
incremented by 1 each time if the filename already exists" at:

http://www.word.mvps.org/FAQs/Macros...edFilename.htm


--
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

"Curt" wrote in message
...
is there a way to save a document by given name(X) on close. This
document
is
opened for changes to be attached to an e-mail. Want to save as on
close
so
origional stays as is. Want user to make any changes then click close
and
have it save as (X)
Thanks






  #6  
Old November 29th, 2008, 05:16 PM posted to microsoft.public.word.docmanagement
Curt
external usenet poster
 
Posts: 132
Default on close save as x

Thanks will see what I can do

"Doug Robbins - Word MVP" wrote:

See the article "A Pseudo DocumentBeforeClose Event" at:

http://www.word.mvps.org/FAQs/Macros...eforeClose.htm


--
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

"Curt" wrote in message
...
Guess I didn't state my self clear enough.Looked at the sub recommended.
What
I wish to do is to get it to activate when the close button is clicked on.
I
know how to do it in excel but not in word. Have tried the following with
no
luck copyed this from excel sheet.

Private Sub Document_BeforCloseel As Boolean)

ThisDocument.SaveAs ("c:\parade\X.doc")
(worksheet)
End Sub

"Doug Robbins - Word MVP" wrote:

See the article "How to save a document using a filename that gets
incremented by 1 each time if the filename already exists" at:

http://www.word.mvps.org/FAQs/Macros...edFilename.htm


--
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

"Curt" wrote in message
...
is there a way to save a document by given name(X) on close. This
document
is
opened for changes to be attached to an e-mail. Want to save as on
close
so
origional stays as is. Want user to make any changes then click close
and
have it save as (X)
Thanks






  #7  
Old November 29th, 2008, 09:37 PM posted to microsoft.public.word.docmanagement
Curt
external usenet poster
 
Posts: 132
Default on close save as x

With the two sites you sent I was able then to solve the problem with 3
simple lines
Thanks Much

"Doug Robbins - Word MVP" wrote:

See the article "A Pseudo DocumentBeforeClose Event" at:

http://www.word.mvps.org/FAQs/Macros...eforeClose.htm


--
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

"Curt" wrote in message
...
Guess I didn't state my self clear enough.Looked at the sub recommended.
What
I wish to do is to get it to activate when the close button is clicked on.
I
know how to do it in excel but not in word. Have tried the following with
no
luck copyed this from excel sheet.

Private Sub Document_BeforCloseel As Boolean)

ThisDocument.SaveAs ("c:\parade\X.doc")
(worksheet)
End Sub

"Doug Robbins - Word MVP" wrote:

See the article "How to save a document using a filename that gets
incremented by 1 each time if the filename already exists" at:

http://www.word.mvps.org/FAQs/Macros...edFilename.htm


--
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

"Curt" wrote in message
...
is there a way to save a document by given name(X) on close. This
document
is
opened for changes to be attached to an e-mail. Want to save as on
close
so
origional stays as is. Want user to make any changes then click close
and
have it save as (X)
Thanks






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:23 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.